我可以在Android按钮中提示文本行断点吗?
也许这是太多的期望,但我可以设置一个提示,在哪里中断线的情况下,一个按钮的文本显示在多行 对于日文和韩文文本,按钮文本似乎在一个单词内断开。例如,在下面的示例中,它被破坏为“感じてね、見つめる\N瞳", 但如果我手动打破它,我会选择“感じてね、\N見つめる瞳“相反,为了”어제 온 고깃배가 고향으로“我会选择的”어제 온 고깃배가\N고향으로“,自”고향으로“是一个没有空格的单词 我不想硬编码“\n”,因为如果有空间,文本可以显示在一行中。我想如果有办法让Android在这里中断,如果你必须中断行。比如我可以在Android按钮中提示文本行断点吗?,android,android-layout,Android,Android Layout,也许这是太多的期望,但我可以设置一个提示,在哪里中断线的情况下,一个按钮的文本显示在多行 对于日文和韩文文本,按钮文本似乎在一个单词内断开。例如,在下面的示例中,它被破坏为“感じてね、見つめる\N瞳", 但如果我手动打破它,我会选择“感じてね、\N見つめる瞳“相反,为了”어제 온 고깃배가 고향으로“我会选择的”어제 온 고깃배가\N고향으로“,自”고향으로“是一个没有空格的单词 我不想硬编码“\n”,因为如果有空间,文本可以显示在一行中。我想如果有办法让Android在这里中断,如果你必须中断
<Button
android:text="感じてね、見つめる瞳"
android:layout_width="200dp"
android:breakHint="5"
android:layout_height="wrap_content"/>
框架中是否有类似的内容
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:text="感じてね、見つめる瞳"
android:layout_width="150dp"
android:layout_height="wrap_content"/>
<Button
android:text="感じてね、見つめる瞳"
android:layout_width="200dp"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:text="어제 온 고깃배가 고향으로"
android:layout_width="150dp"
android:layout_height="wrap_content"/>
<Button
android:text="어제 온 고깃배가 고향으로"
android:layout_width="200dp"
android:layout_height="wrap_content"/>
</LinearLayout>