atom feed1 message in [android-beginners] how to get te...
FromSent OnAttachments
Romain GuyJan 28, 2008 7:55 am 
Subject:Re: [android-beginners] how to get textview center align
From:Romain Guy (
Date:Jan 28, 2008 7:55:11 am


Replace android:layout_centerHorizontal="true" by android:textAlign="center". You could also used android:layout_width="wrap_content" and android:layout_gravity="center_horizontal".

On Jan 28, 2008 1:41 AM, Gautam Bisht <> wrote:

hi all

i want to get Text View to be center align my xml file is like below but it not works

<LinearLayout xmlns:android=" android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">

<TextView id="@+id/version_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/version_text" android:textSize="16sp" android:typeface="normal" android:textStyle="bold" android:layout_centerHorizontal="true" />


thanks gautam