Max value for rectangle's rounded corners in Android -


i trying shape shown in figure, rectangle corners round: enter image description here

but seems can't corners "rounder" in figure:

enter image description here

why that? there max value <corners android:radius="integer" />? of course png, suppose using shape more efficient, prefer that.

my code:

<button     android:id="@+id/button_guest"     android:layout_width="315dp"     android:layout_height="80dp"     android:background="@drawable/rounded_rectangle"     android:contentdescription="@string/text_button_guest"     android:onclick="startguestmode"     android:text="@string/text_button_normal"     android:textallcaps="false"     android:textcolor="#ff000000"     android:textsize="50sp"     android:layout_marginleft="125dp"     android:layout_marginstart="125dp"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true" /> 

rounded_rectangle.xml:

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android">     <solid android:color="#ffffff" />     <corners         android:radius="40dp" /> </shape> 

ok, love when scratch head hours, end asking question here, , find answer myself in less 10 minutes :d

the solution in code below. think should have same behaviour, apparently has not. bug rounded corners.

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android">     <solid android:color="#ffffff" />     <corners         android:bottomleftradius="40dp"         android:bottomrightradius="40dp"         android:toprightradius="40dp"         android:topleftradius="40dp"         /> </shape> 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -