0

I've changed the way I want my down arrow to look for my Spinner. I was just using a background. But then I decided to try a pointericon. Here is the old code for the Spinner.

<Spinner
    android:id="@+id/spinnerAccount"
    android:layout_width="150dp"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:layout_marginStart="5dp"
    android:background="@drawable/rounded_corner"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent"/>

Here is the new code I have tried.

<Spinner
    android:id="@+id/spinnerAccount"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:layout_marginStart="5dp"
    android:pointerIcon="arrow"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent"/>

This gets me the down arrow I was looking for. but when I tried to change the arrow to another icon, it wouldn't update the preview for the xml file, I tried to run the app and it's still showing the arrow. So I tried to just remove that line altogether. It's still there in the preview and when I run the app.

Here is what it looked like before I made any changes.

old look

Here is what it looks like now.

The big down arrow within the white box is just a background image

There are two down arrows on the new look. The one within the white rectangle is the background image that I tried to use to cover up the pointericon to the right.

I'm not able to remove the pointericon from this or any other new Spinner I create. I've also removed the background image, even tried setting its value to @null but its still showing the background image.

I'm not sure what else to do.

This is where I found out I can use the pointericon

I've tried to create a theme style for the Spinner but that didn't work either.

This method just uses a background image

My issue now is that no matter what I do, the background image isn't going away and neither is the pointericon to the right of the spinner. I've updated Android Studio, I've removed the debug files thinking it might help, but issue still persists.

Is this a bug?

This is what the preview looks like in the xml file

enter image description here

Here is the code for the Spinner in the preview:

<Spinner
    android:id="@+id/spinnerAccount"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="5dp"
    android:layout_marginStart="5dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent"/>

Why is it still there?

UPDATE I've submitted a bug report in Android Studio. Here is the link to the issue tracker. issue tracker bug report

I've still not got the pointerIcon to go away from any of the Spinner's nor does the image change when updating the icon. The spinner background has finally changed, but it's not the background I've selected on all of the Spinners. Some have changed but not all.

0 Answers0