I can provide you with a categorized list of some commonly used
layout attributes
for different types
of views:
1. Common Layout Attributes:
- android:id:
View identifier.
- android:layout_width
and android:layout_height: View dimensions.
- android:layout_gravity:
View gravity within its parent.
- android:layout_margin:
Margins around the view.
- android:layout_marginStart,
android:layout_marginEnd, android:layout_marginTop, android:layout_marginBottom:
Specific margins for individual sides.
- android:layout_weight:
Distribution of extra space in LinearLayout.
2. RelativeLayout Attributes:
- android:layout_toStartOf,
android:layout_toEndOf, android:layout_above, android:layout_below: Positions
the view relative to another sibling view.
- android:layout_alignParentStart,
android:layout_alignParentEnd, android:layout_alignParentTop, android:layout_alignParentBottom:
Aligns the view to the start, end, top, or bottom of its parent container.
- android:layout_alignStart,
android:layout_alignEnd, android:layout_alignTop, android:layout_alignBottom:
Aligns the view relative to another sibling view.
- android:layout_alignBaseline:
Aligns the baseline of the view to the baseline of another view.
3. LinearLayout Attributes:
- android:orientation:
Defines the orientation of the LinearLayout (horizontal or vertical).
- android:baselineAligned:
Aligns the children based on their baseline.
4. FrameLayout Attributes:
- android:foreground:
Foreground drawable.
5. GridLayout Attributes:
- android:layout_row,
android:layout_rowSpan, android:layout_column, android:layout_columnSpan: Row
and column positioning for GridLayout.
6. ConstraintLayout Attributes:
-
Constraint attributes like app:layout_constraintStart_toStartOf, app:layout_constraintEnd_toEndOf,
app:layout_constraintTop_toTopOf, etc.
- app:layout_constraintWidth_percent,
app:layout_constraintHeight_percent: View dimensions as percentages of the
parent.
7. TableLayout Attributes:
- android:shrinkColumns,
android:stretchColumns: Column behavior.
These are just some of
the commonly used layout attributes. Android has many more attributes for
specific views and layout containers, which you can refer to in official
Android documentation.
I can provide you with a categorized list of some commonly used
UI attributes
for
different types of views:
1. Common View
Attributes:
- android:id: View identifier.
- android:layout_width and android:layout_height:
View dimensions.
- android:layout_gravity: View gravity
within its parent.
- android:layout_margin: Margins around the
view.
- android:layout_marginStart, android:layout_marginEnd,
android:layout_marginTop, android:layout_marginBottom: Specific margins for
individual sides.
- android:padding: Padding inside the view.
- android:paddingStart, android:paddingEnd, android:paddingTop,
android:paddingBottom: Specific padding for individual sides.
- android:background: Background drawable or
color for the view.
2. TextView
Attributes:
- android:text: Text content of the
TextView.
- android:textSize: Text size.
- android:textColor: Text color.
- android:textStyle: Text style (bold,
italic, etc.).
- android:gravity: Text gravity within the
TextView.
- android:ellipsize: Ellipsize behavior when
text overflows.
- android:maxLines: Maximum number of lines
for multiline text.
3. ImageView
Attributes:
- android:src: Image resource to display.
- android:scaleType: Scale type for the
image (fit, center, etc.).
- android:tint: Tint color for the image.
4. Button Attributes:
- android:text: Text content of the button.
- android:textSize: Text size.
- android:textColor: Text color.
- android:background: Background drawable or
color for the button.
5. EditText
Attributes:
- android:hint: Hint text displayed when the
EditText is empty.
- android:inputType: Input type for the
EditText (text, number, password, etc.).
- android:maxLength: Maximum character
length allowed.
6. ProgressBar Attributes:
- android:progress: Current progress value.
- android:max: Maximum value for the
progress.
- android:progressTint: Tint color for the
progress bar.
7. CheckBox and
RadioButton Attributes:
- android:text: Text content next to the
checkbox or radio button.
- android:checked: Specifies whether the
checkbox or radio button is checked.
8. Spinner Attributes:
- android:entries: Array resource containing
the spinner options.
- android:prompt: Prompt text displayed when
the spinner is closed.
9. CardView
Attributes:
- app:cardCornerRadius: Corner radius for
the CardView.
- app:cardElevation: Elevation (shadow) for
the CardView.
- app:cardBackgroundColor: Background color
of the CardView.
These are some
commonly used UI attributes in Android. Each view type has its own specific set
of attributes, and Android offers a wide range of customization options.