android:layout_marginRight?

by Mariano Kamp » Thu, 18 Mar 2010 03:12:42 GMT


Sponsored Links
 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"/>

--



android:layout_marginRight?

by Romain Guy » Thu, 18 Mar 2010 03:43:20 GMT


 Why are you using width=fill_parent and gravity=center_horizontal? It
doesn't make sense.



>


Sponsored Links


android:layout_marginRight?

by Mariano Kamp » Thu, 18 Mar 2010 05:05:01 GMT


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





> >



Other Threads

1. Why do all Android handsets run the same processor?

Is it because the core platform does not support the newer chipset?
We get the same tiresome old Qualcomm MSM 7225 528 MHz processor on
every single phone.  I only see two phones rumored to have a different
chipset: Motorola Sholes and SE Racheal.  It appears like they are
adding their own support to Android.
--~--~---------~--~----~------------~-------~--~----~

2. Invoking search by hardware key

Sorry if this sounds like a really stupid question, but I'm really
struggling to understand the SearchManager documentation.

How do I actually invoke a search from the hardware search button in
my application?  I've added the relevant code to the Manifest file,
but pushing the button has absolutely no effect.

The API is very unclear - is this something that should be handled
automatically from the Activity class, or have I got to override
something?  Have I got to include a hardware key listener?

Any help or pointers are appreciated!
--~--~---------~--~----~------------~-------~--~----~

3. How can I add genre info into artist and album list鈥

4. How to launch my app if some one clicks on email attachment?

5. routing audio to speaker

6. usb android architecture

7. How to set custom title for tab activity?