我想製作一個自定義的ChedckBox,並有一箇中心按鈕部分的麻煩。這裏是代碼:複選框 - 居中按鈕
<FrameLayout
android:layout_width="@dimen/checkbox_height"
android:layout_height="@dimen/checkbox_height"
android:background="@drawable/checkbox_background_info"
android:padding="5dp" >
<CheckBox
android:id="@+id/classification_uk_selected"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/checkbox_star_info">
</CheckBox>
</FrameLayout>
Drawbale只是一個黃色的星星,沒有背景的啓用和灰色的禁用。它停留在左手邊,我不能讓如果你改變的FrameLayout到RelativeLayout的你可以設置的android它爲中心
感謝您的幫助
不動它了,它因爲它被鎖定到左側 –