I have a edit text layout as below and I want to know, is there any way to provide different size for it for different hardware depending on its screen size? For screens below 4 inches I want to give the below layout
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:textColor="#800080"
android:text=""
android:hint=" No Operator Precednce yet"
android:cursorVisible="false"
android:textSize="40dip"
/>
and then for others
<EditText
android:id="@+id/entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:textColor="#800080"
android:text=""
android:hint=" No Operator Precednce yet"
android:cursorVisible="false"
android:textSize="30dip"
/>
Create folders in /res for
then create a layout file for each layout, android will choose the right one on runtime.
so you can change the complete layout for each screensize.
If you really only want to set the size, you can create this folders
then put a dimen.xml in each of this folders like this :
just change the value (22dp) in each xml file.
then replace your value with
Very good documantation :
http://developer.android.com/guide/practices/screens_support.html