No takers on this question? Any reason why word-wrapped text won't honor
the layout_centerInParent directive?


>>>>> "Jake" == Jake Colman <[email protected]> writes:

   Jake> I have a layout that is displaying the time in the format "7:35
   Jake> PM".  I'd like the display to be centered horizontally and
   Jake> vertically within the layout.  Here is what I am using:

   Jake> <?xml version="1.0" encoding="utf-8"?>
   Jake> <RelativeLayout
   Jake>        xmlns:android="http://schemas.android.com/apk/res/android";
   Jake>        android:id="@+id/small_widget_layout" 
   Jake>        android:layout_width="fill_parent"
   Jake>        android:layout_height="fill_parent"
   Jake>        android:background="@drawable/appwidget_bg">
   Jake>        <TextView 
   Jake>                android:id="@+id/small_widget_time" 
   Jake>                android:layout_width="wrap_content" 
   Jake>                android:layout_height="wrap_content" 
   Jake>                android:layout_centerInParent="true"
   Jake>                android:textSize="6pt" 
   Jake>                android:textColor="#FFFFFFFF"
   Jake>        />
   Jake> </RelativeLayout>

   Jake> When the textSize is at 6pt, it works correctly.  When I
   Jake> specify 7pt, the string is word-wrapped with the "PM" below the
   Jake> time, which is fine.  But it is aligned left within the
   Jake> layout. Why aren't the two lines of text centered horizontally
   Jake> and vertically?

   Jake> Thanks.

   Jake> -- 
   Jake> Jake Colman -- Android Tinkerer

   Jake> -- 
   Jake> You received this message because you are subscribed to the Google
   Jake> Groups "Android Developers" group.
   Jake> To post to this group, send email to 
[email protected]
   Jake> To unsubscribe from this group, send email to
   Jake> [email protected]
   Jake> For more options, visit this group at
   Jake> http://groups.google.com/group/android-developers?hl=en

-- 
Jake Colman -- Android Tinkerer

-- 
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

Reply via email to