I. Add a background to edittext, and 4 angle arc
The corresponding XML and style are as follows:
< edittext android:id = "@+id/o_item_num" sty Le = "@style/valuetextstyle" Androi D:hint Android:layout_h Eight = "40.0dip" Android:inputtype = "number" Android:singleline= "true" Android:text = "1" />
<stylename= "Valuetextstyle"> <Itemname= "Android:textsize">@dimen/txt_m</Item> <Itemname= "Android:background">@drawable/edit_bg_selector</Item> <Itemname= "Android:layout_width">Fill_parent</Item> <Itemname= "Android:layout_height">Wrap_content</Item> <Itemname= "Android:layout_marginleft">15.0dip</Item> <Itemname= "Android:layout_margintop">10.0dip</Item> <Itemname= "Android:layout_marginright">15.0dip</Item> <Itemname= "Android:layout_marginbottom">10.0dip</Item> <Itemname= "Android:layout_centervertical">True</Item> </style>
<?XML version= "1.0" encoding= "Utf-8"?><selectorxmlns:android= "Http://schemas.android.com/apk/res/android"> <Itemandroid:state_enabled= "false"android:drawable= "@drawable/edit_text_disable" /> <Itemandroid:state_focused= "true"android:drawable= "@drawable/edit_text_focused" /> <Itemandroid:state_pressed= "true"android:drawable= "@drawable/edit_text_focused" /> <Itemandroid:drawable= "@drawable/edit_text" /></selector>
Of course, there is a way to define an arc shape to achieve
Android EditText for arc backgrounds