Open amol-bhagwat opened 5 years ago
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
Hi you can try to check this library: https://github.com/Chivorns/SmartMaterialSpinner. Hope it can help what you need
hi, if you find the solution . please update.