以下文件看不懂:
<?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>

解决方案 »

  1.   

    <?xml version="1.0" encoding="utf-8"?>
    //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>没什么捷径,只有多写,多想
      

  2.   

    这些布局好简单的!很容易学!如果想从事android的话,最好看下!毕竟不怎么难理解!还有就是,如果是设计UI界面的话!这一块可不能不学!呵呵!
      

  3.   

    lz刚开始还是看一些简单的布局,这个布局对初学者来说有点小难度,先看一些RelativeLayout 和LinearLayout,认识一个新事物有个过程,先从简单的入手。直接看一些复杂布局适得其反,其实布局很简单的,慢慢学吧
      

  4.   

    xmlns:android="http://schemas.android.com/apk/res/android"一个网址,这句是作什么用的?
      

  5.   

    耐心点先把HelloView里面的代码都搞清楚,把常用控件的properties都搞清楚