I'm working on an Android Project which allow the user to select a list of item in an Alert Dialog (see the image below).
I'm using android.widget.spinner. But the checkbox aren't well visible.
I'm trying to personalize the checkbox because this kind are by default.
So is it possible to replace them by my own checkbox?
Try out this way in your layout file.
main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearlayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/border" <--- android built-in style. You can define your own whichever you like. Check for it. android:orientation="horizontal" > <CheckBox android:id="@+id/check" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="2dp" /> <TextView android:id="@+id/Textname" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="7dp" android:textColor="#FAFAFA" android:textSize="14dp" android:textStyle="bold" /> </LinearLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With