如果玩家选择了第一个布局,我尝试创建一个小型游戏纸牌游戏
但是屏幕不够大,无法容纳所有字符“ 3”,我试图水平设置scrollview以填充父级,然后填充特定的数量,然后包装内容,但是我很累

    <ScrollView
    android:layout_marginTop="35dp"
    android:layout_width="650dp"
    android:layout_height="wrap_content"
    >

    <LinearLayout
        android:layout_marginTop="40dp"
        android:layout_width="650dp"
        android:layout_height="350dp"
        >


            <RadioGroup

                 android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal" >
            <RadioButton
                android:id="@+id/RBarthu_mage"
                android:button="@drawable/user_arthu"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                />

            <RadioButton
                android:id="@+id/RBDwemer_fighter"
                android:button="@drawable/xuser_dwemer"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="50dp"
                />
                            <RadioButton
                android:id="@+id/RBZombie"
                android:button="@drawable/xuser_zombie"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="50dp"
                />

        </RadioGroup>
    </LinearLayout>


</ScrollView>

最佳答案

在您的<LinearLayout更改行

...layout_height="350dp"




...layout_height="wrap_content"


注意:出于最佳实践,请将<LinearLayout的宽度更改为match_parent

10-02 09:55
查看更多