Manish,
As far as I can tell, when TextView breaks text into multiple lines, it
always takes as much width from the parent view as it can.
One possible workaround is to include explicit linesbreaks, "\n", into
the string.
-- Kostya
22.04.2011 22:53, Manish Garg пишет:
Hi All,
In my application, I am displaying some text in textview on tabs. I
have customized tabs view. because of the text length it is wrapping
in two line which is fine with me.
But this text is getting aligned with the left and no more in center
of the tab view.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@layout/mailbox_tab_bg_state"
android:gravity="center">
<TextView
android:id="@+id/tabTxt"
android:text="list view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@layout/tab_text_color_selector">
</TextView>
</LinearLayout>
I tried to set text view's gravity property as center then text in two
line get in center but it wasn't left aligned with respect to each
other. I wish that lines should be in center of the tab view and left
aligned with themselves.
Thanks& Regards,
Manish Garg
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en