Some example of pre-defined Button style, include buttonStyle, borderlessButtonStyle, buttonStyleToggle and buttonStyleInset.
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
tools:context=".MainActivity">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:text="http://picturedmagazine.blogspot.com/"
android:textStyle="bold" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="buttonStyle: Normal Button style"
style="?android:attr/buttonStyle"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="borderlessButtonStyle: Style for buttons without an explicit border"
style="?android:attr/borderlessButtonStyle"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textOn="ON - buttonStyleToggle: ToggleButton style"
android:textOff="OFF - buttonStyleToggle: ToggleButton style"
style="?android:attr/buttonStyleToggle"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="buttonStyleInset: Button style to inset into an EditText"
style="?android:attr/buttonStyleInset"/>
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="OK"
style="?android:attr/buttonStyleInset"/>
android:id="@+id/id_EditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/id_EditText_Button"
android:layout_alignBottom="@+id/id_EditText_Button"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/id_EditText_Button"
android:singleLine="true"
android:hint="Enter Something" />
Related:
- Custom Color Button
0 تعليقات