Android button text alignment left right – sample

android:gravity=”left|center_vertical” or android:gravity=”right|center_vertical”

<Button
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="left|center_vertical"
                    android:paddingLeft="20dp"
                    android:text="My Button"
                     />
This entry was posted in Android Examples Code and tagged , , . Bookmark the permalink.


Comments are closed.



10,445 views