Join now - be part of our community!

Gravity.RIGHT does not work when anyDensity=false

dai-chan
Visitor

Gravity.RIGHT does not work when anyDensity=false

I am developing an Android app running on Xperia Z and Xperia tablet Z.

My problem is that Gravity.RIGHT property is taking effect when anyDensity=true in the AndroidManifest, but it does not work when anyDensity=false.

Some rightmost characters are partly hidden as shown below. I tried various settings changes in TextView and Layout, but have failed to display them all.

Could someone advise me what I should set to make Gravity.RIGHT completely work when anyDensity=false?

Thank you.

----------------------------------------------------------------------

http://schemas.android.com/apk/res/android"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent"

    android:background="#000000"

    >

   

    android:id="@+id/textDP"

    android:textStyle="bold"

    android:typeface="normal"

    android:textSize="15.125dp"

    android:textColor="#0000ff"

    android:background="#cccccc"

    android:layout_width="200dp"

    android:layout_height="wrap_content"

    android:gravity="center_vertical|right"

    android:layout_marginLeft="50px"

    android:layout_marginTop="50px"

    android:text="@string/Sample001"

    />

   

    android:id="@+id/textDP"

    android:textStyle="bold"

    android:typeface="normal"

    android:textSize="15.125dp"

    android:textColor="#0000ff"

    android:background="#cccccc"

    android:layout_width="200dp"

    android:layout_height="wrap_content"

    android:gravity="center_vertical|right"

    android:layout_marginLeft="50px"

    android:layout_marginTop="75px"

    android:text="@string/Sample002"

    />

  : #Omission

----------------------------------------------------------------------

1 REPLY 1
Rickard
Master

I recommend that you go to the developer site stackoverflow.com regarding this or that you contact or developer world: http://developer.sonymobile.com/about/how-do-i-get-in-contact/.