I'm some what new to android and I'm really confused very much about the difference between parameters android:layout_gravity and android:gravity. So can someone please help me on using these. Thank you!
            Asked
            
        
        
            Active
            
        
            Viewed 1,130 times
        
    3
            
            
        - 
                    possible duplictae http://stackoverflow.com/questions/3482742/android-gravity-and-layout-gravity?rq=1 – kalyan pvs Nov 19 '13 at 04:49
3 Answers
3
            android:layout_gravity is the gravity related to your whole Layout like LinearLayout,Relative layout and android:gravity is the gravity related to your particular view like Button,EditText..etc 
Hope this helps
 
    
    
        Siddharth_Vyas
        
- 9,972
- 10
- 39
- 69
1
            
            
        android:gravity applies graivity to the content of the view, while android:layout_gravity applies gravity to the view itself inside its parent.
For a button,layout_gravity will apply gravity to whole button whereas android:gravity will apply to its content that is text on Button etc.
 
    
    
        Jigar Pandya
        
- 2,129
- 2
- 17
- 27
 
     
    