TextView does not adhere to the top right

I have an unnecessary addition in my textview object. Let me focus only on the upper right text image in my image below, with 1.48and 6.91. My requirement is that the text is drawn in the upper right corner of its own border, so it is “justified on the surface” for DIJACORand “correctly substantiated” before +0.01. I tried gravity="top|right", includeFontPadding=falseand paddings=0but to no avail. In the second case, the rendering result shows some additional spaces after 6.91, which makes it inconsistent with -0.01below. Can anyone share with me how to fix this? Thanks!

grid view object

This is how I define the textView object:

<TextView
    android:id="@+id/priceLast"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:layout_marginTop="0dp"
    android:gravity="top|right"
    android:includeFontPadding="false"
    android:paddingBottom="0dp"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    android:paddingTop="0dp"
    android:singleLine="true"
    android:text="@string/price"
    android:textColor="@color/dark_green"
    android:textIsSelectable="false"
    android:textSize="24sp"
    android:textStyle="bold" />

Root ViewGroup:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/bg_card_selector"
    android:orientation="vertical"
    android:paddingBottom="8dp"
    android:paddingTop="4dp" >
+4
7

№2 , . , "1" "8" . , , . , "4.1" , "4.8". , , , , , , .

+3

, , , - .

, :

1) TextViews ( DIJACOR 1.48), ex: android: layout_height = "100dp" , . .

2) "1" . , 1.48, "1" . , "1" . , . : Android: FontFamily = " " Android: FontFamily = " -" Android: FontFamily = " -" Android: FontFamily = " -"

+2

, 6.91 , . , , .

0

, - 1. 1 9, . android:paddingRight="-1dp". , .

0

, , - DIJACOR 1.78. , marginTop DIJACOR? DIJACOR DIJACOR, marginTop .

From graphical layout view (equals to view in emulator)

0

, DIJACOR TextView 1.48 TextView Top . , paddingTop marginTop .

0

- . , , 9, , Î. . , XML . Android View , .

, . , , marginTop , , . paddingTop .

0

All Articles