Drawableshape---text box-fill, border effect
<?XML version= "1.0" encoding= "Utf-8"?><Shapexmlns:android= "Http://schemas.android.com/apk/res/android"> <!--Fill - <SolidAndroid:color= "#FFFFFF" /> <!--Rounded Corners - <CornersAndroid:radius= "3dip"/> <!--Strokes - <StrokeAndroid:width= "1dip"Android:color= "#961" /> <!--size <size android:width= "50DP" android:height= "50DP"/><!-width and height - <!--spacing of text and borders - <paddingAndroid:left= "2DP"Android:top= "2DP"Android:right= "2DP"Android:bottom= "2DP"/><!--intervals in each direction - <!--gradient <gradient android:startcolor= "@android: Color/white" android:centercolor= "@android: Color/black" Android:endcolor= "@android: Color/black" android:uselevel= "true" android:angle= "Android:ty" Pe= "Radial" android:centerx= "0" android:centery= "0" android:gradientradius= "all"/> -</Shape>
Different display options for input boxes in different states (with focus and no focus)
<?XML version= "1.0" encoding= "Utf-8"?><selectorxmlns:android= "Http://schemas.android.com/apk/res/android"> <Itemandroid:state_window_focused= "false"android:drawable= "@drawable/contact_edit_edittext_normal" /> <Itemandroid:state_focused= "true"android:drawable= "@drawable/contact_edit_edittext_focused" /></selector>
Activity_main.xml
Android:layout_margin = "10DP" margin setting
android:layout_marginleft= "10DP"
Android:layout_marginbottom= "10DP"
android:layout_margintop= "10DP"
android:layout_marginright= "10DP"
android:orientation= "Horizontal" direction set-level -for example, if set to LinearLayout, then the view in LinearLayout will be arranged horizontally (horizontally)
android:orientation= "Vertical" direction Setting-Portrait
Border background setting for an input box--you can do this
< EditText Android:id = "@+id/edit_text1" android:layout_width= "200DP" android:layout_height= "Wrap_content" android:layout_margin= "10DP" android:background= "@ Drawable/dr_edittext " android:hint=" Please enter: " />
android:background= the background settings for the "@drawable/dr_edittext" input Box Press--Custom dr_edittext.xml to perform various properties in--shape
Mainactivity
Edit_text3.setinputtype (Inputtype.type_null); Mask Soft Keyboard Popup
The first skill point acquired by a app--macconvert--