【发布时间】:2016-11-17 16:40:27
【问题描述】:
我在 Andoid 中的布局(按钮)有问题。我想要的是在 ScrollView 中显示按钮,但 ScrollView 必须在 RelativeLayout 下方,或者换句话说,ScrollView 中的前两个按钮不会显示在我的手机上..
这是我的布局:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="?android:textAppearanceLarge" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="58.0dip" android:text="@string/naziv" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" />
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/scrollView" >
<LinearLayout android:layout_gravity="center" android:orientation="vertical" android:paddingLeft="30.0dip" android:paddingTop="90.0dip" android:paddingRight="30.0dip" android:paddingBottom="20dp" android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:id="@+id/button0" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_veter" />
<Button android:id="@+id/button4" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_plimovanje" />
<Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_trenutni_podatki" />
<Button android:id="@+id/button5" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_video" />
<Button android:id="@+id/button2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_mbp" />
<Button android:id="@+id/button10" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_wsg"/>
<Button android:id="@+id/button11" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_ath" />
<Button android:id="@+id/button12" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_sts" />
<Button android:id="@+id/button13" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_w" />
<Button android:id="@+id/button14" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_dotb" />
<Button android:id="@+id/button15" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_ast" />
<Button android:id="@+id/button16" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_caw" />
<Button android:id="@+id/button17" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/gumb_pado" />
</LinearLayout>
</ScrollView>
</LinearLayout>
如何在文本“morska bioloska postaja...”下方显示 ScrollView?
谢谢
【问题讨论】:
标签: android android-layout android-linearlayout android-scrollview