首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

有关Android布局嵌套的有关问题

2013-04-21 
有关Android布局嵌套的问题我是新手 刚接触到Androidlayout文件设计布局的时候,当有嵌套的时候?xml versi

有关Android布局嵌套的问题
我是新手 刚接触到Android
layout文件设计布局的时候,当有嵌套的时候


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:layout_height="fill_parent"> 
 
    <LinearLayout android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">       

    <TextView android:id="@+id/title"
            android:textIsSelectable="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="#FFFFFFFF"
            android:textSize="22sp" />    
    </LinearLayout>  
</LinearLayout>

会提示“This LinearLayout layout or its LinearLayout parent is useless
不知道如何解决
Android 布局
[解决办法]
引用:
我是新手 刚接触到Android
layout文件设计布局的时候,当有嵌套的时候
Plain Text code?1234567891011121314151617<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/a……

上面的布局确实不需要那个父Linearlayout啊,你在父LinearLayout里面随便加一个组件,应该就不会提示错误了

热点排行