2013-04-05 21 views
0

我添加了一個滾動視圖來滑動以查看按鈕。我將它添加到下面的代碼中。我已經設置了橫向方向,並且我的應用程序的最後一個按鈕(第八個)不適用於我的三星mini S3的4英寸屏幕,它適合​​模擬器上較大的屏幕尺寸。父爲固定大小,單選按鈕似乎傳播更多的實際設備上的。任何想法?SOLVED.Android.XML。大型收音機組全部不適合屏幕

<ScrollView 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="#111111" 
android:gravity="left" 
tools:context=".MainActivity" > 
    <RelativeLayout> 
     <RadioGroup 
    android:id="@+id/RadioGroup1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentTop="true" 
    android:orientation="vertical" > 

    <RadioButton 
     android:id="@+id/RadioButtonlowC1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_gravity="center" 
     android:layout_marginTop="0dp" 
     android:button="@drawable/my_radio" 
     android:checked="false" /> 

    <RadioButton 
     android:id="@+id/RadioButtonD1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 

    <RadioButton 
     android:id="@+id/RadioButtonE1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 

    <RadioButton 
     android:id="@+id/RadioButtonF1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 

    <RadioButton 
     android:id="@+id/RadioButtonG1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 

    <RadioButton 
     android:id="@+id/RadioButtonA1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 

    <RadioButton 
     android:id="@+id/RadioButtonB1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 

    <RadioButton 
     android:id="@+id/RadioButtonC1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:button="@drawable/my_radio" /> 
</RadioGroup> 

`

回答

0

裹相對佈局與滾動型

<ScrollView 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" 
tools:context=".MainActivity" > 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="#111111" 
      android:gravity="left" > 

      <!-- your stuff --> 

      </RelativeLayout> 

</ScrollView> 
+0

感謝喜這個建議我剛纔找到了一個可行的解決方案,如果我使用scroll v查看它允許我向下滾動查看按鈕感謝您的建議,儘管 – 2013-04-05 09:55:28

+0

如果您發現您的答案接受它或發佈它,以便其他人可以參考它 – Abx 2013-04-05 09:59:55