How to put text at the center of LinearLayout horizontally?

teepleaccouch

New Member
How to put text at the center of LinearLayout horizontally?Do I have to use layout_margin?\[code\]<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"><TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello" android:layout_gravity="center_horizontal" // this does not work/></LinearLayout>\[/code\]
 
Back
Top