Android border on a button difference between 4.4 and 4.0.3
I have an activity with a coloured background and a button which is the same colour which I want to minimally show with a white outline. I used this answer to make a border on a button and it works just fine for me on Nexus 4 and 5 running 4.4.4 I try it on a Samsung S2 running 4.0.3 and the entire button turns black. No border. The button should be same colour as the activity with a white border. Text colour on the button (white) is just fine Here is my border.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <corners android:radius="3dp" /> <stroke android:width="1px" android:color="#ffffff" /> </shape> Can anyone explain the different behaviour, and more importantly tell me how to fix it? Thanks Edit Well I don't have a real answer, but I think I'm going to fix it by adding in <solid android:color="#color/mycolor" /> To my drawable shape. I think this works, but it's not very elegant if I want to have a transparent background. I may try setting the color to transparent at some point (on the assumption that some phones/versions of Android default to a black background and this is that easy to change), but no time for it now.
showDatePickerDialog can't load DatePicker Dialog
Permission issues while trying to compile native code
sherlock SearchView always collapsed
How to pass data between activities
Add a LinearLayout in bundle
Android start system service at app startup
add animation to listview items
Android Disable airplane mode at version >=4.1
Android: Adding many children to a layout in a separate thread
Robotium with parameter
Android navigating to parent Fragment Activity from within Fragments
How to query rows in between two datetime columns?
App crashes when receiving of message
How to make layout have the same height?
Could we use a library project as a jar file?
ADB shows unknown device