【发布时间】:2014-02-07 16:03:51
【问题描述】:
我使用 5 英寸智能手机测试了以下视图。现在我用 HTC Wildfire 进行了测试,发现问题是,我只看到前两个按钮,而第三个按钮非常小。 如果没有足够的空间来显示按钮,我希望用户可以滚动查看完整的按钮。我做错了什么?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_ohne"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".NachdemSpiel" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textStyle="bold"
android:text="Herzlichen Glückwunsch! Dein Highscore beträgt: " />
<TextView
android:id="@+id/tvPunkteNach"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:text="" />
<Button
android:id="@+id/nbtSenden"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/nbtNochmal"
android:layout_below="@+id/tvPunkteNach"
android:layout_marginTop="50dp"
android:background="@drawable/highscoresenden" />
<Button
android:id="@+id/nbtNochmal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/nbtHauptmenu"
android:layout_below="@+id/nbtSenden"
android:layout_marginTop="10dp"
android:background="@drawable/nochmalspielen" />
<Button
android:id="@+id/nbtHauptmenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/nbtNochmal"
android:layout_marginTop="10dp"
android:background="@drawable/hauptmenue" />
</RelativeLayout>
【问题讨论】:
标签: android layout view scroll