Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android ScrollView中的RadioGroup不填充ScrollView。相反,单选按钮被挤压_Android_Scrollview - Fatal编程技术网

Android ScrollView中的RadioGroup不填充ScrollView。相反,单选按钮被挤压

Android ScrollView中的RadioGroup不填充ScrollView。相反,单选按钮被挤压,android,scrollview,Android,Scrollview,如果您在一个RadioGroup中有大量的单选按钮,并且希望它们拉伸,而不是挤压成小按钮,那么我考虑将RadioGroup放在滚动视图中。然而,这不起作用。有人知道如何做到这一点吗 <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:fillViewport="true" > <RadioGroup

如果您在一个RadioGroup中有大量的单选按钮,并且希望它们拉伸,而不是挤压成小按钮,那么我考虑将RadioGroup放在滚动视图中。然而,这不起作用。有人知道如何做到这一点吗

<ScrollView 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:fillViewport="true"
    >
    <RadioGroup
    android:id="@+id/news_radiogroup"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    >
      <RadioButton  />
      <RadioButton  />
      <RadioButton  />
      <RadioButton  />
      and more
   </RadioGroup>
</ScrollView>

还有更多

使用
水平滚动视图
而不是解决问题的
滚动视图

。我没有想到这一点,虽然很明显。非常感谢你。