我有這個XML.I想要在Java代碼的XML代碼的linearlayoutUp中包含動態按鈕,並且我希望此按鈕以水平位置出現,任何想法都會垂直懸掛到水平在動態佈局中更改位置按鈕
<LinearLayout 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="#FFCCCCCC"
android:orientation="vertical"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/linearlayoutUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical" >
</ScrollView>
</LinearLayout>
<com.example.nuevo.ControladorView
android:id="@+id/drawing"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_marginBottom="3dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="3dp"
android:layout_weight="0.83" />
<LinearLayout
android:id="@+id/linearlayoutDown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
什麼是你想第二個'LinearLayout'和'ScrollView'辦? –
線性是創建按鈕的區域。按鈕的數量可能很高,所以我介紹layout4內的scrollView – user3232094
嘿!我刪除了滾動螞蟻它的作品,但我想包括滾動,我怎麼能做到這一點?謝謝,謝謝! – user3232094