0

Here I have a expandable list view

enter image description here

now i put a Checkbox in it in the childs below

enter image description here

and my childview grow bigger - why and how can I set it smaller?

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="10dp"
android:background="@drawable/mb">
    <TextView
        android:id="@+id/list"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:paddingLeft="23dp"
        android:textSize="18dp"
        android:textStyle="bold"
        android:textColor="#000000"
        />

    <CheckBox
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"

        android:id="@+id/checkBox"
        android:layout_centerVertical="true"

        android:layout_alignParentRight="true"
        />

</RelativeLayout>
Chad White
  • 309
  • 1
  • 4
  • 15

1 Answers1

0

Change the dp on the layout_height and layout_width of the checkbox(or really anything else) to get the size you need. For example:

<Checkbox
 android:layout_width="1dp"
 android:layout_height="1dp"
 android:id="@+id/checkBox"/>

in the item you wish to re-size.

Another option is to use custom check boxes, more info here: Android: How to change CheckBox size?

Community
  • 1
  • 1
ACluelessProgramer
  • 308
  • 1
  • 5
  • 13