The first skill point acquired by a app--macconvert--

Source: Internet
Author: User

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--

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.