1
我遇到了Xoom平板电脑布局问题。基本上,我想要一个片段(ListView)在左侧,另一个片段到ListView片段。但是,我在这方面有两个问题。Xoom平板电脑的相对布局问题
首先,我不想硬编码设置为200dip(请参阅下面的代码)的listview片段的android:layout_width。我尝试了wrap_content,fill_parent但它没有为我工作。
其次,此UI不会在整个屏幕上呈现。它只捕获整个平板电脑屏幕的一小部分。即使从fill_parent到其他值的硬编码也没有任何影响。
代码如下所示。我真的很感谢在这个问题上的任何帮助。
〜谢谢!!
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment class="com.example.android.apis.app.FragmentLayout$TitlesFragment"
android:id="@+id/titles" android:layout_width="200dip"
android:layout_alignParentLeft="true"
android:layout_height="match_parent" />
<FrameLayout android:id="@+id/details"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_toRightOf="@id/titles"
android:background="?android:attr/detailsElementBackground" />
</RelativeLayout>
非常感谢你布拉德利的回复。 – user720986 2011-09-15 05:13:12