我有一个如下所示的布局。 我的问题是,在小屏幕上,视图底部的按钮被推出了用户的视图。我认为我可以通过将整个布局封装在ScrollView中来轻松解决这个问题,但是我知道这不是一个可行的解决方案,因为在我的布局中有一个ListView。需要关于如何改善小屏幕布局的输入
那么,关于如何改变这种布局的任何建议?我的主要问题是我有一个适配器连接到ListView,我不确定是否可以重做布局并使用适配器。想到任何人?
问候 丹尼尔
顺便说一句,我的here's布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
style="@style/defaultBackground"
>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:paddingBottom="10dip"
>
<TextView
android:id="@+id/roundInfo"
android:layout_width="wrap_content"
android:layout_height="20dip" android:textColor="#000"
/>
<TextView
android:id="@+id/balance"
android:layout_width="fill_parent"
android:layout_height="20dip"
android:gravity="right"
android:textColor="#000"
/>
</LinearLayout>
<ListView
android:id="@android:id/list"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:textSize="10sp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:listSelector="@drawable/custom_row"
android:background="@drawable/custom_listview"
android:dividerHeight="0dip"
android:cacheColorHint="#FFFFFF"
android:fadingEdge="none"
android:divider="#FFFFFF"
/>
<TextView
android:id="@+id/gameCost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gameCost_not_finished"
android:textColor="#000" \
android:paddingTop="10dip"
/>
<Button
android:id="@+id/update_button"
android:text="@string/placebet_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/whiteText"
android:background="@drawable/custom_button"
/>
</LinearLayout>
非常感谢你的回答!我想知道如果我的用户在使用RelativeLayout解决方案时认为ListView太小,我是否可以做任何事情? – Daniel 2010-12-21 20:56:22