我正在为Android设备制作应用程序,我正在尝试在LinearLayout中使用ScrollView,但是当我尝试执行此操作时,ScrollView将获取ScrollView之后的所有空间和元素在LinearLayout中不起作用。Android:垂直LinearLayout的滚动视图
例如:
如果滚动型是不是 “全”:
如果滚动型是 “充分”:
正如你可以看到按钮disapear ...
以下是此活动的代码:
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_marginLeft="50dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
android:background="@drawable/linearlayoutbackground" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nom_des_joueurs"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginBottom="30dp" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/llPlayersName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
</LinearLayout>
</ScrollView>
<Button
android:id="@+id/okPlayersName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/ok"
android:background="@drawable/backgroundbutton"
android:layout_marginTop="30dp" />
</LinearLayout>
在添加Linea中的元素后rLayout谁在ScrollView中。
任何解决方案?
谢谢。
正在写相同的解决方案在同一时间:-p你更快.. –
谢谢你的工作:) – kakko76