以下文件看不懂:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<five.itcast.cn.Chessboard android:id="@+id/chessboard"
android:layout_width="match_parent"
android:layout_height="match_parent"
tileSize="24"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/text"
android:text="@string/hello"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#ff0000"
android:textSize="24sp"/>
</RelativeLayout></FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<five.itcast.cn.Chessboard android:id="@+id/chessboard"
android:layout_width="match_parent"
android:layout_height="match_parent"
tileSize="24"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/text"
android:text="@string/hello"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#ff0000"
android:textSize="24sp"/>
</RelativeLayout></FrameLayout>
解决方案 »
- Android getSharedPreferences 问题
- 摇一摇功能 X、Y、Z三轴数据怎么校验 精度判断比较合适
- android andengine游戏引擎
- android 密码框
- 微信5.0这是想闹哪样,求助
- Android下怎么把多张图片拼成一个gif啊,有没有现成的库?
- 如何创建指定分辨率的浏览视图
- 【求大神帮忙】Android开发时main.xml问题求解
- android 代码怎么实时拿到连接当前wifi热点的设备信息? 或者其它设备连接或是断开会有什么广播吗? 求大神指导!!!
- AS布局视图不显示,实际运行正常,已尝试多种方法
- 装了JDK-SDK-Eclipse后提示
- 请问,Android2.2和2.3的模拟器中使用的键盘驱动是哪个?谢谢
//framelayout是一个层式布局,不做控制的话,后面的图层都会覆盖前面的图层
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"> //背景色
//自定义的一个控件
<five.itcast.cn.Chessboard android:id="@+id/chessboard"
android:layout_width="match_parent"
android:layout_height="match_parent"
tileSize="24"/>
<RelativeLayout //相对布局
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/text" //textview id
android:text="@string/hello" //文本
android:visibility="visible" // textview可见
android:layout_width="wrap_content"
android:layout_height="wrap_content" //宽高
android:layout_centerHorizontal="true" //水平垂直居中
android:layout_centerVertical="true"
android:textColor="#ff0000" //字体颜色
android:textSize="24sp"/> //字体大小
</RelativeLayout></FrameLayout>没什么捷径,只有多写,多想