当前位置:编程学习 > wap >>

【求助】android初级问题

问题现象:

源代码:


    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/TableLayout01"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="top" >

        <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/abc"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/tv1" />

        </TableLayout>

    </LinearLayout>

--------------------编程问答-------------------- 不会吧?一晚上了,竟然没人回复? --------------------编程问答-------------------- 快来个人救救我吧。。。。。 --------------------编程问答-------------------- 警告可以忽略
还有就是xmlns:android="http://schemas.android.com/apk/res/android"只需要一个就可以了
--------------------编程问答-------------------- 就为了那个警告这么纠结?因为你的LinearLayout下面就一个子控件,所以LinearLayout多余的,系统告诉你可以优化下,减少UI层级 --------------------编程问答-------------------- 是个警告,不影响程序,是因为你的LinerLayout下面只有一个TableLayout,没有任何其他的布局,所以这样的话,LinnerLayout在这里就对TableLayout没有约束了 --------------------编程问答--------------------
引用 4 楼 b87936260 的回复:
就为了那个警告这么纠结?因为你的LinearLayout下面就一个子控件,所以LinearLayout多余的,系统告诉你可以优化下,减少UI层级


哦,这样啊,呵呵,谢谢了!
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,