Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change spinner selected text color? #146

Open
amol-bhagwat opened this issue Mar 14, 2019 · 3 comments
Open

How to change spinner selected text color? #146

amol-bhagwat opened this issue Mar 14, 2019 · 3 comments

Comments

@amol-bhagwat
Copy link

No description provided.

@amol-bhagwat amol-bhagwat changed the title How to change floating label color? How to change spinner selected text color? Mar 14, 2019
@RahathNavith
Copy link

hi, if you find the solution . please update.

@andiwijayaid
Copy link

You can create new layout. For example, I named it item_spinner

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@android:id/text1"
          style="?android:attr/spinnerItemStyle"
          android:singleLine="true"
          android:layout_width="match_parent"
          android:textColor="@color/colorAccent"
          android:layout_height="wrap_content"
          android:ellipsize="marquee"
          android:textAlignment="inherit"/>

Refrence the layout that you made to adapter

val adapter = ArrayAdapter(applicationContext, R.layout.item_spinner, items)
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)

@RahathNavith @amol-bhagwat

@Chivorns
Copy link

Hi you can try to check this library: https://github.com/Chivorns/SmartMaterialSpinner.
Hope it can help what you need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants