I have a layout that is displaying the time in the format "7:35 PM".
I'd like the display to be centered horizontally and vertically within
the layout. Here is what I am using:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/small_widget_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/appwidget_bg">
<TextView
android:id="@+id/small_widget_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="6pt"
android:textColor="#FFFFFFFF"
/>
</RelativeLayout>
When the textSize is at 6pt, it works correctly. When I specify 7pt,
the string is word-wrapped with the "PM" below the time, which is fine.
But it is aligned left within the layout. Why aren't the two lines of
text centered horizontally and vertically?
Thanks.
--
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