0

Android での改行の動作に問題がありました

このように壊れています(写真):

Text View 1 | Text View 2 with linebreak
            | is breaking like this

私はそれを次のように壊したい:

Text View 1 | Text View 2 with linebreak
breaks like this

ここに私のxmlがあります:

<LinearLayout
           android:layout_width="fill_parent"
           android:layout_height="fill_parent">

       <TextView
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="New Text "
               android:id="@+id/textView2"
               android:textColor="#000000"
               android:singleLine="true"/>

        <TextView
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="New TextNew TextNew TextNew TextNew TextNew Text"
               android:id="@+id/textView3"
               android:singleLine="false"
               android:phoneNumber="false"
               android:textColor="#000000"
               android:textStyle="bold|italic"/>
</LinearLayout>

これは可能ですか?

4

3 に答える 3

1

TextViews互いに流れる能力がないため、2 つを別々に使用することはできません。それらは、テキストを含む単なるボックスです。

于 2013-05-30T20:35:34.663 に答える
0

2 番目のテキスト ビューを最初のテキスト ビューの上に配置してから、2 番目のテキスト ビューのテキストの前に空白を追加することができます。

于 2013-05-30T21:19:22.427 に答える