NiceSpinner 完美的 Android 下拉选择框


1.简介

GitHub地址:https://github.com/arcadefire/nice-spinner

 

Gradle中添加:

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

dependencies {
    implementation 'com.github.arcadefire:nice-spinner:1.3.7'
}

  

 

 

 

2.使用

 

xml文件:

    <org.angmarch.views.NiceSpinner
        android:id="@+id/nice_spinner"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        app:arrowTint="@color/colorPrimary"
        app:textTint="#f00"
        />

  

activity:

        spinner=findViewById(R.id.nice_spinner);
        List<String> dataset = new LinkedList<>(Arrays.asList("One", "Two", "Three", "Four", "Five"));
        spinner.attachDataSource(dataset);

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM