Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Texts in NumberPicker are cut off

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

enter image description here

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>
like image 408
hhs Avatar asked Nov 09 '22 03:11

hhs


1 Answers

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.

like image 186
Dan Bray Avatar answered Nov 14 '22 23:11

Dan Bray