I have a button code, where in i dont want border for this button, so for that i set propertie "android:background="?android:attr/selectableItemBackground"
, but it will not work in API version 8 i.e in Froyo emulator. Please provide me the alternatives.
<Button
android:id="@+id/serviceContactNumber"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/icon"
android:layout_alignLeft="@+id/serviceName"
android:gravity="center_vertical"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:freezesText="true"
android:textSize="30dip"
android:background="?android:attr/selectableItemBackground"/>
Thanks in advance.
Borderless buttons are part of the Holo theme which is not available to earlier API versions by default. You can however use HoloEverywhere to make the theme available. At this time it does not actually support borderless buttons either but you can get the same effect by setting the buttons background to android:background="@drawable/list_selector_holo_light"
if thats too heavyweight a solution either extract the appropriate assets from holoeverywhere or from \android-sdk\platforms\android-16\data\res\drawable and put them into your own project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With