4

いくつかのまったく同じTextViews が垂直方向に配置されています (同じマージンが左に、同じパディングが左に、同じ位置が左に)。テキストのサイズが異なるだけでなく、テキストが異なる文字で始まる可能性があります。問題は、TextViews が左に配置されているにもかかわらず、それらのテキストが左に配置されていないことです。これを達成することは可能ですか?各最初の文字の前にある余分なスペースを削除/因数分解するには? または、特定のフォントを探す必要がありますか?

下の写真はその様子です。左に3 つTextViewの s が並んでいますが、各文字は異なる位置から始まります。smは同じサイズですが、整列していません。はかなり小さく、ギャップははるかに大きいです。

私が見ているもの:
実際

私が欲しいもの:
期待される結果 (手動で調整)

例のコード:

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="m"
        android:textColor="#88FF0000"
        android:textSize="250dp" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="s"
        android:textColor="#8800FF00"
        android:textSize="250dp" />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="220dp"
        android:text="i"
        android:textColor="#880000FF"
        android:textSize="25dp" />
</RelativeLayout>
4

1 に答える 1