Basic properties of some controls in Android

One: ListView's commonly used attributes
android:id is used to set the name of the ListView
android:divider is used to set the ListView divider, which can be used for color division or Drawable resource division
android:dividerHeight is used to set the height of the divider
** **************************************************** ****************************************************
_ **************************************************** ****************************


Second: GridView's commonly used attributes
android:id is used to set GridView's name
android:columnWidth is used to set columns The width
android:gravity   is used to set the alignment
android:horizontalSpacing is used to set the horizontal spacing between elements android
:numColumns is used to set the number of columns , spacingWidth (stretch only the spacing between elements)

cloumnWidth: only stretch the table element itself, spacingWidthUniform (the table element itself, the spacing stretched together)


android:verticalSpacing is used to set the vertical spacing between elements.


**************************************************** ****************************************************
_ **************************************************** ********************************
Three: UI control properties - (TextView/Buttons/CheckBox/RadioButton/ToggleButton/RatingBar)
1.TextView (text box)
 android:id is used to set the name of the text box


android:capitalize is used to set whether the input English letters are automatically changed to uppercase letters (0 means no automatic; 1 means the first letter is automatically changed to uppercase; 2 means every The first letter of each word becomes uppercase; 3 means all letters become uppercase)


android:cursorVisible Whether the cursor is displayed when it can be edited (true means the cursor is displayed; false means the cursor is not displayed)


android:editable If set to true, it means the text The box can be edited
android:gravity is used to set the alignment of the text box
android:password is used to set whether the text is a hidden password style
android:text is used to specify the text content displayed in the text box




2.EditText (edit box)


inherits the common attributes of EditText from the android.widget.TextView class.


android:autoText is selected to automatically correct spelling errors for the text in the edit box
android :drawableBottom is used to draw the specified picture at the bottom of the text in the edit box
android:drawableRight is used to draw the specified picture at the right end of the text in the edit box
android:editable is used to set whether the edit box can be edited, the default value is true
android:text Used to set the default text displayed in the edit box. The common attribute of EditText




inherited from the android.view.View class.
android:background is used to set the background image of the edit box.
android:contentDescription is used to set the simple description text of the edit box
. Used to set the name of the edit box
android:onClick Used to set the name of the click event response method
android:visibility Used to set whether the edit box is visible


3.AutoCompleteTextView (auto-fill text box)


android:completionHint Used to pop up the drop-down menu Specify the prompt title


4.Button basic property settings (same as editable)
Inherited from the common attribute of android.widget.TextView class button
android:autoText is selected to automatically correct spelling errors on the text displayed on the button
android:drawableBottom is used to draw the specified image at the bottom of the text in the edit box
android:drawableRight is used to Draw the specified image at the right end of the text in the edit box
android:editable is used to set whether the edit box can be edited, the default value is true
android:text is used to set the default text displayed in the edit box Button




inherited from the android.view.View class Common properties (same as editable)









































































Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324839411&siteId=291194637