I know we can set the following values to the android:gravity and android:layout_gravity properties:
android:gravity
android:layout_gravity
gravity: is used for simple views like textview, edittext etc.
layout_gravity: is used for current view only gravity in context of it's relative parent view like linear Layout or FrameLayout to make view in center or any other gravity of its parent.