I always struggled when and where to use layout_gravity and gravity. Pleaae help me
Asked
Active
Viewed 596 times
1 Answers
1
Easy trick to remember: Take "layout-gravity" as "Lay-outside-gravity"
Their names should help you:
- android:gravity sets the gravity of the content of the View its used on.
- android:layout_gravity sets the gravity of the View or Layout in its parent.
And an example is here.

Guilherme Carneiro
- 11
- 3