I want to make my buttons style like the following
I want to implement these buttons with my custom view I mean without using the AlertDialog
I want to make my buttons style like the following
I want to implement these buttons with my custom view I mean without using the AlertDialog
If you prefer to use standard android attributes, see my answer here.
In short, for your buttons set style="?android:attr/buttonBarButtonStyle"
and put them in a LinearLayout
that has style="?android:attr/buttonBarStyle"
.
You can just do it with xml, like this:
Put this in drawable/border.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#000000" />
<stroke android:width="1dip" android:color="#333333"/>
</shape>
And then in your layout file:
<Button
...
android:background="@drawable/border"
android:textColor="#ffffff"
android:textSize="13sp"
... />
Then you can just set your width & height to make it look great! :)
Edit: I would recommend to use this answer instead thought, much more better to use built-in Android-resources.