Best way to deal with size differences Android 2.3.5 vs 4.0

I am trying to get a form with this form:

enter image description here

This works correctly in 1.6-2.3.5 when using the following:

<shape xmlns:android="http://schemas.android.com/apk/res/android" 
 android:shape="rectangle"> 
<solid android:color="#cc6900"/>

<corners android:radius="0.1dp" android:bottomRightRadius="7dp" android:bottomLeftRadius="0dp"
 android:topLeftRadius="0dp" android:topRightRadius="7dp"/> 

However, when running on a Galaxy Nexus or 4.0 Emulator, I have to use this to get the same layout:

...
<corners android:radius="0.1dp" android:bottomRightRadius="0dp" android:bottomLeftRadius="7dp"
 android:topLeftRadius="0dp" android:topRightRadius="7dp"/> 
...

Which gives me this on 1.6:

enter image description here

Thus, in previous versions, everything was used in the lower and lower layers in one direction, and now 4.0 in the other.

Is there any simple way that I can be like it is for pre 4.0 and give 4.0 users changed values? If possible, I would prefer to save it in XML and not have it in code.

+5
source share
1 answer

Hm, , , .;)

XML-, , Android 4.0 res/drawable/, , Android 4.0+ res/drawable-v14/. (14 - API Android 4.0.) Android 4.0 .

, , . : http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources

+12

All Articles