• Stars
    star
    1,526
  • Rank 30,689 (Top 0.7 %)
  • Language
    Java
  • Created over 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android滚动选择控件

WheelView

最后打个广告哈,阿里巴巴,杭州招技术,支持电话视频面试,有兴趣的同学戳这里:https://github.com/wangjiegulu/jobs

How to use

layout:

<com.wangjie.wheelview.WheelView
        android:id="@+id/main_wv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    />

Activity:

WheelView wva = (WheelView) findViewById(R.id.main_wv);
wva.setOffset(1);
wva.setItems(Arrays.asList(PLANETS));
wva.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
    @Override
    public void onSelected(int selectedIndex, String item) {
        Log.d(TAG, "selectedIndex: " + selectedIndex + ", item: " + item);
    }
});

Show in dialog:

View outerView = LayoutInflater.from(this).inflate(R.layout.wheel_view, null);
WheelView wv = (WheelView) outerView.findViewById(R.id.wheel_view_wv);
wv.setOffset(2);
wv.setItems(Arrays.asList(PLANETS));
wv.setSeletion(3);
wv.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
    @Override
    public void onSelected(int selectedIndex, String item) {
        Log.d(TAG, "[Dialog]selectedIndex: " + selectedIndex + ", item: " + item);
    }
});

new AlertDialog.Builder(this)
        .setTitle("WheelView in Dialog")
        .setView(outerView)
        .setPositiveButton("OK", null)
        .show();

License

Copyright 2014 Wang Jie

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Android Arsenal

More Repositories

1

RapidFloatingActionButton

Quick solutions for Floating Action Button,RapidFloatingActionButton(RFAB)
Java
1,288
star
2

DraggableFlagView

可拖拽的红点,(仿新版QQ,tab下面拖拽标记为已读的效果),拖拽一定的距离可以消失回调。
Java
807
star
3

ShadowViewHelper

Shadow layout, shadow view for android.
Java
777
star
4

AndroidBucket

[DEPRECATED]Android开发常用整理
Java
498
star
5

WaveCompat

Wave effect of activity animation
Java
348
star
6

androidInject

[DEPRECATED]使用注解来简化android开发, Use annotations inject to simplify the development of android
Java
111
star
7

ImageLoaderSample

android端用于异步加载图片,内存缓存,文件缓存,imageview显示图片时增加淡入淡出动画
Java
98
star
8

RecyclerViewSample

RecyclerViewSample
Java
87
star
9

RxAndroidEventsSample

BusEvents implementation base RxJava/RxAndroid
Java
83
star
10

RefreshableView

可下拉刷新的ViewGroup、ListView
Java
45
star
11

jobs

Jobs for Alibaba Group.
28
star
12

KotlinAndroidSample

Android sample with kotlin.
Kotlin
27
star
13

RapidORM

Quick solutions for Android ORM
Java
26
star
14

RapidMavenPushPlugin

A Gradle plugin : Upload Artifacts to Multi Maven Repository
Groovy
21
star
15

AndroidParcelablePlugin

Intellij IDEA(Android Studio) Plugin for Android Parcelable.
Java
21
star
16

RapidMetaInfPlugin

Android Gradle Plugin for add generate file to META-INF folder in apk.
Groovy
19
star
17

SeizeRecyclerView

Use multiple adapters for a single RecyclerView.
Java
16
star
18

ssr_dockerfile

dockerfile for ssr.
Dockerfile
14
star
19

RapidOOO

Android POJO Converter:Generate scalable and bindable domain objects java class file automatically in compile time.
Java
13
star
20

RapidRouter

A lightweight router framework for Android.
Java
8
star
21

DiscardFilePlugin

An android gradle plugin for discard class or method in compile time.
Groovy
7
star
22

AndroidStorageIntent

实现Activity间传递任意数据
Java
6
star
23

TheOldReaderForAndroid

The Old Reader For Android ! API Support:https://github.com/theoldreader/api
Java
6
star
24

CleanAndroidProject_MVP

Clean Android Project Example (MVP).
Java
5
star
25

MVPArchitecture

Best Practices of MVP architecture.
Java
4
star
26

AndroidKotlinBucket

Kotlin base library for android.
Kotlin
4
star
27

dal_request

Http request library for DAL layer in Android base on okhttp3, RxJava2.
Java
3
star
28

Rapier

Dependency injection Framework for Android. No reflection, Generate java code in compile time, and Inject everywhere.
Java
3
star
29

wangjiegulu.github.com

my blog
HTML
3
star
30

AndroidProjectExample

Android Project Example, MVP
2
star
31

flutter_test_01

RandomWords Example for Flutter(both Android & iOS): https://flutter.io/get-started/codelab/
Dart
2
star
32

hexo_blog

My hexo blog
EJS
2
star
33

AndroidAdapter

Android Adapter(ListView Adapter, RecyclerView Adapter) from AndroidBucket
Java
2
star
34

express_server_demo

TypeScript
1
star
35

InboxView

Inbox View
Java
1
star
36

ZoomingSlideLayout

Zooming Slide Layout
1
star
37

EpochText

Java
1
star
38

ApkPluginLoader

ApkPluginLoader
Java
1
star