我有这个布局:
<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在右侧被剪裁,我不知道为什么。
有谁知道如何解决这个问题?
答案 0 :(得分:2)
尝试将android:paddingRight
添加到CheckBox
。如果使用dp
而不是px
添加填充以填充值