You're right. Thanks. It works now.

<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android";
android:id="@+id/status_text"
 android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
 android:layout_margin="3dp"

android:textColor="#fff"
android:background="@drawable/status_background"

android:visibility="gone"/>

On Wed, Mar 17, 2010 at 8:43 PM, Romain Guy <[email protected]> wrote:

> Why are you using width=fill_parent and gravity=center_horizontal? It
> doesn't make sense.
>
> On Wed, Mar 17, 2010 at 12:12 PM, Mariano Kamp <[email protected]>
> wrote:
> > Hi,
> >   I have a small text view (see below) that should span the complete
> width,
> > except for a margin left and right. No matter what I specify for
> > marginRight, it always gets added to the left side, i.e. the margin left
> > grows and the text view is flush to the right side though.
> >   Am I doing something wrong here?
> > Cheers,
> > Mariano
> > <?xml version="1.0" encoding="utf-8"?>
> > <TextView
> > xmlns:android="http://schemas.android.com/apk/res/android";
> > android:id="@+id/status_text"
> > android:layout_width="fill_parent"
> > android:layout_height="wrap_content"
> > android:layout_gravity="center_horizontal|bottom"
> > android:layout_marginLeft="3dp"
> > android:layout_marginRight="13dp"
> > android:layout_marginTop="3dp"
> > android:layout_marginBottom="3dp"
> > android:textColor="#fff"
> > android:gravity="center"
> > android:background="@drawable/status_background"
> > android:visibility="gone"/>
> >
> > --
> > 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]<android-developers%[email protected]>
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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