21. The personalized design buttons

This article describes two individual design to Android buttons.

Andrews button design personality, in fact, is to give him a plus property background,

And then set the background for this goal can achieve results,

 

xml settings button

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:background="@drawable/yuanjiao"
        android:gravity="center"
        android:text="圆角Button"

        />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"

        android:background="@drawable/complete"
        android:gravity="center"
        android:text= "Perfect the Button" 

        />

 

The next step is to design the background,

Create a background that this

Right-click the project in res, click new, click on the android resource file

Guess you like

Origin www.cnblogs.com/gzyx/p/12042807.html
21.