【发布时间】:2015-10-09 08:39:16
【问题描述】:
我有 NumberPicker 安全问题的对话。长文本被截断。如何解决这个问题?
这是对话框的布局内容
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<NumberPicker
android:id="@+id/numberPicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp" />
<com.aperto.ext.edekaapp.ui.CustomFontButton
android:id="@+id/reg_fields_number_dialog_button"
style="@style/BlueButton.Big"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:text="@string/reg_fields_number_dialog_button_text" />
</LinearLayout>
【问题讨论】:
-
你可以把
new Line命令放在String上,比如:"Hello\n world",在中间使用\n -
是单行文本字段吗?
-
你应该使用
"Hello\nworld"否则你会在新行中看到一个空格。 -
@Aspicas 数字选择器删除(忽略)新行(\n)
-
那是因为你的文本字段是一个单行,试着改变它,你有XML吗?你能贴出来吗? @hhs
标签: android numberpicker