Thanks Mark.  I knew you would come through.  I did figure that out
after I sent the post.

However now I have another problem maybe someone can help.  In the
following I want to align the Texview in the vertical center of the
ImageButton.  However it isn't working.  Any ideas?

<ImageButton android:id="@+id/btnBeer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/currentBAC"
        android:src="@drawable/beer2" />
<TextView adnroid.id="@+id/tvBeer"      
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/btnBeer"
        android:layout_centerVertical="@id/btnBeer"
        android:textColor="#000000"
        android:text="@string/beertxt" />

Thanks,

Kevin
On Sat, 2009-05-02 at 12:18 -0400, Mark Murphy wrote:
> Kevin J. Brooks wrote:
> > This is the first Widget in a relative layout.  Even though I hav the
> > gravity set to center horizontal, it is aligned to the left.
> > 
> > <TextView  android:id="@+id/beresp"
> >     android:layout_width="wrap_content" 
> >     android:layout_height="wrap_content" 
> >     android:text="@string/hello"
> >     android:layout_gravity="center_horizontal"
> >     android:textStyle="bold"
> >     android:textColor="#000000"
> >     />
> 
> Use android:layout_centerHorizontal="true"
> 
> http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to