All Projects → BCsl → Cursorwheellayout

BCsl / Cursorwheellayout

Licence: apache-2.0
An Android Widget for selecting items that rotate on a wheel.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Cursorwheellayout

integration-test
ensure core packaging tools work well with each other
Stars: ✭ 15 (-97.89%)
Mutual labels:  wheel
cresset
Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.
Stars: ✭ 573 (-19.3%)
Mutual labels:  wheel
Tensorflow Bin
Prebuilt binary with Tensorflow Lite enabled (native build). For RaspberryPi / Jetson Nano. And, solved Tensorflow issues #15062,#21574,#21855,#23082,#25120,#25748,#29617,#29704,#30359. Support for custom operations in MediaPipe.
Stars: ✭ 349 (-50.85%)
Mutual labels:  wheel
whey
A simple Python wheel builder for simple projects.
Stars: ✭ 17 (-97.61%)
Mutual labels:  wheel
TensorFlow-Raspberry-Pi 64-bit
TensorFlow installation wheels for Raspberry Pi 64 OS
Stars: ✭ 27 (-96.2%)
Mutual labels:  wheel
wheel
Echo Wheel -- 用Vue写的UI框架
Stars: ✭ 28 (-96.06%)
Mutual labels:  wheel
use-gesture
👇Bread n butter utility for component-tied mouse/touch gestures in React and Vanilla Javascript.
Stars: ✭ 6,624 (+832.96%)
Mutual labels:  wheel
Cibuildwheel
🎡 Build Python wheels for all the platforms on CI with minimal configuration.
Stars: ✭ 620 (-12.68%)
Mutual labels:  wheel
wheeltimer
crontab, golang crontab, wheeltimer
Stars: ✭ 13 (-98.17%)
Mutual labels:  wheel
Enteranimation
android 仿ppt进入/转场动画,入场动画效果合集,自定义view实现动画,百叶窗效果,擦除效果,盒状效果,阶梯效果,菱形效果,轮子效果,劈裂效果,棋盘效果,切入效果,扇形展开效果,十字扩展效果,随机线条效果,向内溶解效果,圆形扩展效果,适用于任何view和viewgroup,activity即用于页面根部viewgroup,自定义viewgroup自动换行layout,看效果图 Series of entrance animation effects just like ppt in Android. There are effects of Blinds,Wipe,Box,Strips,Diamond,Wheel,Split,Checkerboard,Peek In,Wedge,Plus,Random Bars,Dissolve In,Circle. The Animation effects can apply to any View or ViewGroup. There is also a custom ViewGroup of auto linefeed called SimpleLineWrapLayout to layout the buttons. look the images:
Stars: ✭ 328 (-53.8%)
Mutual labels:  wheel
python
Build Python extension with Dynamsoft Barcode Reader.
Stars: ✭ 35 (-95.07%)
Mutual labels:  wheel
wheelodex
An index of wheels
Stars: ✭ 20 (-97.18%)
Mutual labels:  wheel
Gb Canvas Turntable
适用于移动端的Canvas绘制可配置的转盘抽奖
Stars: ✭ 294 (-58.59%)
Mutual labels:  wheel
hid-tminit
Linux driver to properly initialize some Thrustmaster Wheels
Stars: ✭ 23 (-96.76%)
Mutual labels:  wheel
Wheelview
The wheel widget for Android 滚轮选择控件
Stars: ✭ 350 (-50.7%)
Mutual labels:  wheel
opencv-python-inference-engine
Wrapper package for OpenCV with Inference Engine python bindings.
Stars: ✭ 32 (-95.49%)
Mutual labels:  wheel
WheelPickerByRecyclerView
用RecyclerView实现的滚轮选择器
Stars: ✭ 14 (-98.03%)
Mutual labels:  wheel
Wheelpicker
A smooth, highly customizable wheel view and picker view, support 3D effects like iOS. 一个顺滑的、高度自定义的滚轮控件和选择器,支持类似 iOS 的 3D 效果
Stars: ✭ 684 (-3.66%)
Mutual labels:  wheel
React Use Gesture
👇Bread n butter utility for component-tied mouse/touch gestures in React and Vanilla Javascript.
Stars: ✭ 5,704 (+703.38%)
Mutual labels:  wheel
Tensorflow Windows Wheel
Tensorflow prebuilt binary for Windows
Stars: ✭ 3,428 (+382.82%)
Mutual labels:  wheel

CursorWheelLayout

CursorWheelLayout is an Android library that allows view to be placed on a rotatable wheel. It behaves like a Circular ListView where items rotate rather than scroll vertically(but without view recycle strategy). CursorWheelLayout consists of two components , the center item with id id_wheel_menu_center_item and the menu items that provided by CycleWheelAdapter.

The CursorWheelLayout can be used as a way to select one item from a list. The wheelSelectedAngle attribute determines what position on the wheel is selected. You can also receive a callback for when an item is clicked, and whether it is selected. Have a look at the sample for a working example!

Screenshot

1 2

Apk

Download Demo here

Setup

Gradle

compile 'github.hellocsl:CursorWheelLayout:1.1.0'

Maven

<dependency>
  <groupId>github.hellocsl</groupId>
  <artifactId>CursorWheelLayout</artifactId>
  <version>1.1.0</version>
  <type>pom</type>
</dependency>

Usage

  1. Add a custom view in Xml
  <github.hellocsl.cursorwheel.CursorWheelLayout
        android:id="@+id/test_circle_menu_right"
        android:layout_width="306dip"
        android:layout_height="306dip"
        android:layout_gravity="center_vertical|right|bottom"
        android:layout_marginBottom="-153dp"
        android:layout_marginRight="-153dip"
        app:wheelBackgroundColor="@color/colorAccent_Translucent"
        app:wheelCursorColor="@color/red"
        app:wheelCursorHeight="20dip"
        app:wheelFlingValue="460"
        app:wheelSelectedAngle="225">

        <github.hellocsl.cursorwheellayout.widget.SwitchButton
            android:id="@id/id_wheel_menu_center_item"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:boardWidth="0dip"
            app:uncheckRevealColor="#ff2a2f36"
        />
    </github.hellocsl.cursorwheel.CursorWheelLayout>

  1. Define your WheelCycleAdapter
public class SimpleTextAdapter implements CursorWheelLayout.CycleWheelAdapter{

        public int getCount(){
        //...
        }

        public View getView(View parent, int position){
        //...
        }

        public Object getItem(int position){
        //...
        }

}
  1. Set your WheelCycleAdapter similar to how you would set an adapter with a ListView
        SimpleTextAdapter simpleTextAdapter = new SimpleTextAdapter(this, menuItemDatas);
        mTestCircleMenuLeft.setAdapter(simpleTextAdapter);

Listener

  1. A listener for when the closest item to the SelectionAngle changes.
      mTestCircleMenuTop.setOnMenuSelectedListener(new CursorWheelLayout.OnMenuSelectedListener() {
            @Override
            public void onItemSelected(CursorWheelLayout parent, View view, int pos) {
                Toast.makeText(MainActivity.this, "Top Menu selected position:" + pos, Toast.LENGTH_SHORT).show();
            }
        });
  1. A listener for when an item is clicked.
        mTestCircleMenuTop.setOnMenuItemClickListener(new CursorWheelLayout.OnMenuItemClickListener() {
            @Override
            public void onItemClick(View view, int pos) {
                Toast.makeText(MainActivity.this, "Top Menu click position:" + pos, Toast.LENGTH_SHORT).show();

            }
        });

Useful attributes

Here are the custom attributes that can be declared in xml:

  • wheelSelectedAngle
  • wheelPaddingRadio
  • wheelCenterRadio
  • wheelItemRadio
  • wheelFlingValue
  • wheelCursorHeight
  • wheelCursorColor
  • wheelBackgroundColor
  • wheelItemRotateMode

Refer to

http://blog.csdn.net/lmj623565791/article/details/43131133

License

Apache License Version 2.0 http://apache.org/licenses/LICENSE-2.0.txt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].