Sunday, October 30, 2016

android - Standard borderless Button

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/coordinator_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#99e1fd"
    >
    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:background="?android:attr/dividerVertical"
        >
        <Button
            android:id="@+id/btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Standard Borderless Button"
            android:layout_gravity="center"
            android:padding="50dp"
            style="?android:attr/borderlessButtonStyle"
            />
    </RelativeLayout>
</android.support.design.widget.CoordinatorLayout>