我可以在一个frameLayout内插入两个frameLayout吗? 我试过这段代码,它不工作!在另一个框架布局内插入框架布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal" >
<FrameLayout
android:id="@+id/titles"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1" />
<FrameLayout
android:id="@+id/details"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="2" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:orientation="horizontal" >
<FrameLayout
android:id="@+id/details1"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1" />
<FrameLayout
android:id="@+id/details2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
当我点击一个元素,我希望detail1被打印。我想细节1已经在细节下创建,所以我看不到它?
任何人都可以帮忙吗?
有什么,我想:
这不能工作:<的FrameLayout 机器人:ID = “@ + ID /方式” 机器人:layout_width = “match_parent” 机器人:layout_height = “match_parent”> 机器人:layout_width = “match_parent” 使我在所有屏幕上的框架布局,android:layout_weight =“2”将不起作用 – 2012-03-30 16:35:48
为什么不画一些草图并在这里张贴让我们看看你想要什么。 – 2012-03-30 17:09:12
我已经加入图片到我的问题 – 2012-03-31 12:25:13