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. CPU Clock History

So I want something that can keep track of CPU clock speed over a
period of time. Specifically when the screen was off. I asked around
and no really had a good solution.

Being new to android but old to linux, I figured I could just make a
script that would check /proc/cpuinfo and every couple of seconds and
save it to a text file. Simple....I thought.

CPUinfo on my phone (HTC Incredible) doesn't show processor speed.

Anyone know of a way to accomplish what I want? Maybe there is an app
out already that will do what I wish, but I haven't been able to find
one.

-- 

2. disable hard Search button while contextmenu is on.




Why? If I have your context menu up and decide I want to search, why should
you stop me?

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 

3. WebView - numeric keyboard from html

4. Android: Multiple POST on the same connection

5. ClassNotFoundException on Market developer console

6. How to have a Service, un-killed by any task killer

7. Stagefright Multimedia Framework