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