Texts in NumberPicker are cut off

假如想象 提交于 2019-12-07 08:57:07

问题


I have dialog with NumberPicker security questions. The long texts are cut off. How to solve this issue?

This is layout's content for dialog

<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>

回答1:


I had the same problem. I managed to fix it by giving the NumberPicker a large layout_margin.

After adding this line:

android:layout_margin="60dp"

my number picker no longer truncates the text and it appears to have no layout issues.



来源:https://stackoverflow.com/questions/33033660/texts-in-numberpicker-are-cut-off

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!