Giter Site home page Giter Site logo

wheelpicker's Introduction

最火Android开源项目WheelPicker使用


开源地址:https://github.com/open-android/WheelPicker

PS:如果觉得文章太长,你也可观看该课程的视频,亲,里面还有高清,无码的福利喔

运行效果

  • 爱生活,爱学习,更爱做代码的搬运工,分类查找更方便请下载黑马助手app

黑马助手.png

使用步骤

1. 在project的build.gradle添加如下代码(如下图)

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

2. 在Module的build.gradle添加依赖

 compile 'com.github.open-android:WheelPicker:v1.0.0'

3. 复制如下代码到xml

<com.itheima.wheelpicker.WheelPicker
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:wheel_atmospheric="true"
    app:wheel_curved="true"
    app:wheel_cyclic="true"
    app:wheel_selected_item_position="5"
    app:wheel_item_text_color="#66ff0000"
	app:wheel_selected_item_text_color="#6600ffff"/>


<!--属性解释:

    wheel_atmospheric :  条目颜色是否执行衔接处理 效果更好
    wheel_curved : 是否是弧形状态显示
    wheel_cyclic : 是否可循环
    wheel_selected_item_position : 默认选中第几个条目
    wheel_item_text_color 未选中的条目颜色
    wheel_selected_item_text_color  选中的条目颜色-->

###4 . 运行即可

细节注意:

默认会自带一组数据,所以无需设置数据。 若想设置新的数据,可通过 调用如下方法即可

	setData(List data); 
  • 详细的使用方法在DEMO里面都演示啦,如果你觉得这个库还不错,请赏我一颗star吧~~~

  • 欢迎关注微信公众号

wheelpicker's People

Contributors

open-android avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.