I have a layout file where part of it is below. 2 TextViews nested
inside the same FrameLayout so that the 1st one (being lower in the Z-
order) shows up behind the text (which has transparent background).

<FrameLayout android:id="@+id/upper_status"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="2dp">
<TextView android:id="@+id/player_hp"
android:layout_width="5dp"
android:layout_height="fill_parent"
android:background="#ff0000"/>
<TextView android:id="@+id/player_name"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00000000"
android:gravity="center"
android:text="@string/player_name"/>
</FrameLayout>

My goal is to change the width of the first TextView so that it
represents the HP of a player. But no matter what I do programatically
(e.g. setWidth(x), measure(), requestLayout(), etc.) nothing seems to
change the size of the TextView.

Can someone help? I must be missing something stupid and the
documentation doesn't point me anywhere.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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