0

I tried to set margins and padding to 0, but can't get rid of it.

Here's a screenshot: enter image description here

And here my xml for the dropdown:

<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
                 android:id="@android:id/text1"
                 android:layout_width="match_parent"
                 android:background="@color/j3PreferencesBackground"
                 android:checkMark="@drawable/btn_checkbox_s3_pref_j3"
                 android:layout_height="50dp"
                 android:ellipsize="end"
                 android:gravity="center_vertical"
                 android:minHeight="22dp"
                 android:paddingLeft="6dp"
                 android:paddingRight="10dp"
                 android:maxLines="1"
                 android:textColor="@color/j3Gray70"
                 android:textSize="18sp"/>

and for the spinner:

<Spinner
    android:id="@+id/settingsSetSpinner"
    android:background="@color/j3PreferencesBackground"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/settingsPickerTitle"
    android:defaultValue="0"
    android:entries="@array/import_export_locations"
    />
j3App
  • 1,510
  • 1
  • 17
  • 26

1 Answers1

0

Try to add padding with 0dp and layout_gravity as left.

<Spinner
        android:id="@+id/settingsSetSpinner"
        android:background="@color/j3PreferencesBackground"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
         android:padding="0dp"     
        android:layout_below="@+id/settingsPickerTitle"
        android:defaultValue="0"
        android:entries="@array/import_export_locations"/>

For more details refer this link Remove Spacing or Padding in android Spinner

Ankita
  • 1,129
  • 1
  • 8
  • 15
  • I had already tried setting margin and padding = 0, but hadn't tried the android:layout_gravity="left". Unfortunately that didn't fix it either
    Anyway, thanks for the link.
    – j3App Sep 20 '17 at 13:39