I'm making my own search view for Android 2.3.
I have.
LinearLayout
(Horizontal)AutoCompleteTextView
ImageButton
I added the button and AutoCompleteTextView
to LinearLayout
.
I want to put a corner radius in my own control like the image shown below.
I set this drawable to ImageButton
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" >
<shape>
<solid
android:color="#27AFE0" />
<stroke
android:width="0.5dp"
android:color="#000000" />
<corners
android:topRightRadius="10dp" android:bottomRightRadius="10dp"
android:topLeftRadius="0.1dp"
android:bottomLeftRadius="0.1dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
<item>
<shape>
<solid android:color="#D3DBDE"/>
<stroke
android:width="0.5dp"
android:color="#000000" />
<corners
android:topRightRadius="10dp" android:bottomRightRadius="10dp"
android:topLeftRadius="0.1dp"
android:bottomLeftRadius="0.1dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
drawable to AutoCompleteText
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#D3DBDE"/>
<stroke android:width="0.5dp" android:color="#000000"/>
<corners android:topLeftRadius="10dp"
android:bottomLeftRadius="10dp"
android:topRightRadius="0.1dp"
android:bottomRightRadius="0.1dp"/>
</shape>
</item>
But when I run this in android 2.3 this is the output (Emulator and Real Device)
If I run also in Android 4.0 . It works fine.
Question is, what's wrong in my code? Or There's bug in Android 2.3?