SoFunction
Updated on 2025-04-07

A complete collection of layout attributes in Android

This article summarizes the meaning and usage of the layout attribute in Android. Share it for your reference. The details are as follows:

layout:

AbsoluteLayout:
xmlns:andro
style="@..."
android:clipChildren="true|false"
android:clipToPadding="true|false"
android:layoutAnimation="@---"
android:animationCache="true|false"
android: persistentDrawingCache="none|animation|scrolling|all": Continuous cache drawing
android:alwaysDrawnWithCache="true|false"
android:andStatesFromChildre="true|false"
android:descendantFocusability="beforeDescendants|afterDescendants|blocksDescendants": Descendants can focus
android:
android:tag="@---"
android:android:scrollX="---"
android:android:scrollY="---"
android:background="@---"
android:padding="----"
android:paddingLeft="----"
android:paddingTop="----"
android:paddingRight="----"
android:paddingBotton="---"
android:focusable="true|false"
android:focusableInTouchMode="true|false"
android:visibility="visible|invisible|gone"
android:fitsSystemWindows="true|false": Suitable for system windows
android:scrollbars="none|horizontal|vertical"
android:scrollbarStyle="insideOverlay(insideoverlay)|insideInset(inside illustration)|outsideOverlay(outsideoverlay)|outsideInset(outside illustration)"
android:isScrollContainer="true|false": is a scrolling collection
android:fadeScrollbars="true|false": Faded scrollbars
android:scrollbarFadeDuration="---":Scroll fades out
android:scrollDefaultDelayBeforeFade="---": Default delay before scrolling
android:scrollbarSize="---"
android:scrollbarThumbHorizontal="@----":Thumb horizontal scrollbar
android:scrollbarThumbVertical="@----":Thumb vertical scrollbar
android:scrollbarTrackVertical="@---":Vertical scrollbar track
android:scrollbarTrackHorizontal="@---":horizontal scrollbar track
android:scrollbarAlwaysDrawHorizontalTrack="true|false": Horizontal scrollbars always attract tracks
android:scrollbarAlwaysDrawVerticalTrack="true|false": Vertical scrollbar always attracts tracks
android:fadingEdge="none|horizontal|vertical": The edge of fading
android:fadingEdgeLength="---":The side is long and fade
android:nextFocusLeft="----":lower left focus
android:nextFocusUp="---":Next Focus Registration
android:nextFocusRight="---":The correct next focus
android:nextFocusDown="---":Next focus moves down
android:clickable="true|false":Click
android:longClickable="true|false"
android:saveEnabled="true|false":Enable save
android:drawingCache Quality="auto|low|high":drawing cache quality
android: keepScreenOn="true|false": Keep the screen
android:duplicateParentState="true|false": Repeat parent status
android:minHeight="---":
android:minWidth="----":
android:soundEffectEnabled="true|false":Sound Effect Enabled
android:hapticFeedbackEnable="true|false":Hatonic Feedback Enable
android:contentDescription="@---":Content Overview
android:onClick="@---":
android:layout_gravity="top|bottom|right|left|center_vertical|center_horizontal|fill_vertical|fill_horizontal|center|fill|clip_vertical|clip_horizontal":gravity
android:layout_width="fill_parent|match_parent|wrap_content"
android:Llayout_height="fill_parent|match)parent_wrap_content"
android:layout_margin="":
android:layout_marginLeft=""
android:layout_marginTop=""
android:layout_marginRight=""
android:layout_marginBottom=""

DialerFilter (Dialer Filter):

ExpandableListView (extable list view):
FrameLayout (Pin Layout):
GridView:
HorizontalScrollView (horizontal scroll view):
ImageSwither:
LinearLayout:

ListView:
MediaController:
RadioGroup (Radio button group):
RelativeLayout:
ScrollView (scroll view):
SlidingDrawer:
TabHost (tag host):
TabWidget(tag control):
TableLayout:
TableRow (table row):
TextSwitcher:
ViewAnimator (View animation):
ViewFlipper (see Flipper):
ViewSwitcher:
---------------------------------------------------
GestureOverlayView (gesture overview view):
SurfaceView:
View (see):
ViewStub (View stub):
WebView (WEB view):
AnalogClock (analog clock):
AutoCompleteTextView (autocomplete text view):
Button:
CheckBox(checkbox):
CheckedTextView (checked text view):
Chronometer:
DatePicker (date selector):
DigitalClock:
EditText (edit text):
Gallery:
ImageButton:
ImageView:
MultiAutoCompleteTextView (multi-auto-complete text viewing):
ProgressBar:
QuickContactBadge:
Radio Button:
RatingBar (rating bar):
SeekBar (search bar: drag the progress bar):
Spinner (fine-tuning):
TextView (text view):
TimePicker (TimePicker):
ToggleButton (toggle button):
TwoLineListItem(two-line list item):
VideoView (video view):
ZoomButton (zoom button):
ZoomControls:
Include(including):
-------------------------------
<merge></merge>(merge):
xmlns:andro
android:layout_gravity="top|bottom|left|right|center_vertical|fill_vertical|center_horizontal|fill_horizontal|center|fill|clip_vertical|clip_horizontal"
android:layout_width="fill_parent|match_parent|wrap_content"
android:layout_height="fill_parent|match_parent|wrap_content"
android:layout_margin=""
android:layout_marginLef=""
android:layout_marginTop=""
android:layout_marginRight=""
android:layout_marginBottom=""

I hope this article will be helpful to everyone's Android programming design.