我有这样的布局:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center_vertical"
android:layout_marginLeft="10dp">
<CheckBox
android:id="@+id/screen_login_checkbox"
android:button="@drawable/login_screen_checkbox_image_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/screen_login_checkboxLabel"
android:layout_alignBaseline="@id/screen_login_checkbox"
android:textColor="@color/black"
android:textSize="@dimen/screen_login_check_text"
android:layout_height="wrap_content"/>
</LinearLayout>
问题是这在智能手机上有效,但在平板电脑上无法正常工作。在平板电脑上,CheckBox 在右侧被夹住,我不知道为什么。
有人知道如何解决这个问题吗?
最佳答案
尝试将 android:paddingRight
添加到您的 CheckBox
。如果您使用 dp
而不是 px
作为填充值来添加填充
关于android - CheckBox 被夹在平板电脑中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8416836/