4

I want to create button login and sign up like

this.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Quang Dai Ngo
  • 41
  • 1
  • 5
  • With bare hand.. (see http://developer.android.com/reference/android/widget/Button.html and http://developer.android.com/guide/topics/ui/controls/button.html) –  Mar 16 '16 at 17:14
  • 1
    Welcome to StackOverflow! What have you tried and where are you stuck? – OneCricketeer Mar 16 '16 at 17:14
  • thanks for your answer, i don't have keywork to search, i will try it..many thanks – Quang Dai Ngo Mar 16 '16 at 17:23

1 Answers1

6

Include the button.xml in your layout and use it as a button by giving it an id or u can set the border to button too in order to get the same result

button.xml

 <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/border">

        <TextView android:id="@+id/skillTextView"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Cleaner"
              android:textSize="@dimen/abc_text_size_medium_material"
              android:textColor="@color/text_grey"
              android:layout_margin="@dimen/normal_margin"
              android:layout_centerInParent="true"
    />
    </RelativeLayout>

drawable/border.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <corners
            android:radius="5dp"
            />
    <stroke
            android:width="1dp"
            android:color="@color/white" />
</shape>
Shahab Rauf
  • 3,651
  • 29
  • 38