mardi 30 juin 2015

Background images in checkbox don't work well

I'm fairly new to android, and I'm making an app with several checkbox. and I have a problem in the design. In some phones (like the Moto G or Sony Ericsson m2) works perfect, but small cell (like Xperia X8 or S Galaxy Mini) it looks bad. The words appear incomplete, I do not understand why? This is the basic code:

<ScrollView
    android:id="@+id/mainScrollView"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:scrollbarThumbVertical="@drawable/custom_scroll_style"
    android:fillViewport = "true"
    >


    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/idSecundario"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        >

        <CheckBox
            android:id="@+id/actuarioAdm0"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:onClick="itemClicked"
            android:fontFamily="Arial"
            android:text="@string/ch_analisis_matematico_I"
            android:background="@drawable/amarillo"
            android:button="@drawable/check"
            android:enabled="true"
            />

...

I tried changing the size of the images but still does not work. Someone would know what can happen?

Screenshots:

It looks good (large cell)

Large cell

It does not look good. The words appear incomplete

Small cell

I'm testing. It seems it's relative with background images, but I tried to resize and still not working.

Testing

I'll be very grateful if someone can help me. (Sorry if my English is not well)




Aucun commentaire:

Enregistrer un commentaire