我有一个简单的应用程序。屏幕是在相对布局内构建的。我还有
LinearLayout(s),其中之一显示 2 个 RadioButton(s),如下所示:
<LinearLayout android:layout_width="match_parent" android:layout_height="fill_parent"
android:padding="3dp" android:gravity="center">
<RadioGroup android:id="@+id/rgrDayToReport"
android:orientation="horizontal"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<RadioButton android:checked="true" android:id="@+id/rbtnToday"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/radioTodayText"/>
<RadioButton android:id="@+id/rbtnYesterday"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/radioYesterdayText"/>
</RadioGroup>
</LinearLayout>
该面板在除三星 Galaxy s3 之外的任何设备中都能正确渲染(正如我所做的测试)。在此设备上(仅在此设备上),屏幕如下所示:
我应该如何解决这个问题?
我遇到了同样的问题。我已经通过不设置解决了这个问题paddingLeft
在单选按钮和复选框上 - 保留默认值。paddingLeft
在所有手机上从可绘制区域开始计算,在 Galaxy S3 上从左角开始计算。还设置background
在 Galaxy S3 上造成了同样的错误。保留默认值后,它现在可以在任何地方使用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)