I made a button in it the text, but when I run on the screens included in the Small range, for example Nexsus_s, the text becomes two lines. As far as I know, the size of the text is not considered sp and should scale itself. Well, it turns out that my button allows the text to crawl away. If instead of 28 dp I set the height of the content, the button becomes too big.
` <RadioButton android:id="@+id/radioButton3" android:layout_width="wrap_content" android:layout_height="28dp" android:layout_weight="1" android:background="@drawable/anim_button" android:button="@android:color/transparent" android:gravity="center" android:text="@string/button_sort_name3" android:textSize="14sp" />` Here is the entire layout:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativeLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical"> <ListView android:id="@+id/ListView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_below="@+id/linearLayout2" /> <TextView android:id="@+id/ListOfCurrencies" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_below="@+id/linearLayout3" android:textSize="18sp" /> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="false" android:layout_alignParentStart="false" android:layout_alignParentTop="false" android:layout_marginTop="20dp" android:orientation="horizontal"> <TextView android:id="@+id/textView2" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_weight="1" android:text="@string/currency" android:textSize="24sp" /> <Spinner android:id="@+id/spinnerCurrency" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="15dp" android:layout_weight="1" android:gravity="center" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@+id/ListOfCurrencies" android:layout_alignParentLeft="false" android:layout_alignParentStart="false" android:layout_marginBottom="80dp" android:orientation="horizontal"> <TextView android:id="@+id/textDate" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_weight="1" android:text="@string/date" android:textSize="24sp" /> <TextView android:id="@+id/Current_Date" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:gravity="center" android:onClick="onClickDate" android:textColor="@android:color/holo_orange_dark" android:textSize="24sp" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout3" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="106dp" android:orientation="horizontal" android:layout_below="@+id/linearLayout1" android:layout_alignParentLeft="true" android:layout_alignParentStart="true"> <RadioGroup android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <RadioButton android:id="@+id/radioButton1" android:layout_width="wrap_content" android:layout_height="28dp" android:layout_weight="1" android:background="@drawable/anim_button" android:button="@android:color/transparent" android:gravity="center" android:text="@string/button_sort_name1" /> <RadioButton android:id="@+id/radioButton2" android:layout_width="wrap_content" android:layout_height="28dp" android:layout_weight="1" android:background="@drawable/anim_button" android:button="@android:color/transparent" android:gravity="center" android:text="@string/button_sort_name2" /> <RadioButton android:id="@+id/radioButton3" android:layout_width="wrap_content" android:layout_height="28dp" android:layout_weight="1" android:background="@drawable/anim_button" android:button="@android:color/transparent" android:gravity="center" android:text="@string/button_sort_name3" /> </RadioGroup> </LinearLayout> <fragment android:id="@+id/fragment" android:name="mobiledimension.exchangerates.FragmentAct" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/ListView" android:layout_centerHorizontal="true" android:layout_marginBottom="44dp" /> </RelativeLayout> It turns out on a small screen like this: https://gyazo.com/33a89a7d85c5b06f5affadc6a918fff1
And on the big ones: https://gyazo.com/1d24ac4d8f0d463f74b4f092aadfab24
