Xamarin – Button Styles in Android
In this post we would see how to add styles to the Button control in Android using Xamarin.
Button with Text
This is the plain old button style which contains text as content. However the layout_width property holds another design tweak where the button width would be filled to parent or to be wrapped to content. Even you could fix it to some dp values.
Button with Image and Text
In this style, a button would have an image on the left side and text on the right side. Where @drawable/Icon is the path of the image.
Button with Image
In this style only image would be present.
Button with Image and Transparency
The android:background property is used here instead of android:drawableLeft. Also you could add padding for uniformity in design.
Also we have an ImageButton, which could satisfy our style needs.
We will see more styles while doing some good designs.
Hope this post helps, thanks for reading.