I tried to make a button with round corners using the codes below:
first_page_button.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="15px" />
<solid android:color="#199900" />
</shape>
activity xml:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center">
<Button
android:id="@+id/login_page_send_code"
android:layout_width="wrap_content"
android:minWidth="120dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_height="45dp"
android:layout_marginTop="25dp"
android:layout_marginRight="20dp"
android:text="@string/login_page_send_code"
android:textSize="10dp"
android:textColor="#EAEAEA"
android:alpha="1"
android:background="@drawable/first_page_button"/>
<Button
android:id="@+id/login_page_login"
android:layout_width="wrap_content"
android:minWidth="100dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_height="35dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="20dp"
android:text="@string/login_page_login"
android:textSize="15dp"
android:textColor="#EAEAEA"
android:alpha="1"
android:background="@drawable/first_page_button"/>
</LinearLayout>
The normal one line sentence looks like supposed.bmp.But I found that when the sentences are more than one line the two corners on the bottom won't be round liketwo-line.bmp. Please help me to modify my code, thanks for yours help!