2

私はこのレイアウトを持っています:

<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>

問題は、これはスマートフォンでは機能しますが、タブレットでは正しく機能しないことです。タブレットでは、チェックボックスが右側でクリップされていますが、その理由はわかりません。

誰かがこれを修正する方法を知っていますか?

4

1 に答える 1

2

に追加android:paddingRightしてみてくださいCheckBox。パディング値でdpはなくを使用してパディングを追加すると、テーブルや小画面でもうまく機能するはずです。px

于 2011-12-07T15:24:55.583 に答える