All Projects → mochixuan → ETurntable

mochixuan / ETurntable

Licence: other
ETurntable

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ETurntable

react-turntable
🎯 A HTML5 raffle turntable component for react
Stars: ✭ 22 (+29.41%)
Mutual labels:  rotate, turntable
Eram
Open Source RAM Disk
Stars: ✭ 227 (+1235.29%)
Mutual labels:  disk
Crossplatformdisktest
Windows, macOS and Android storage (HDD, SSD, RAM) speed testing/performance benchmarking app
Stars: ✭ 123 (+623.53%)
Mutual labels:  disk
Zelda dawn dusk
Zelda 64: Dawn & Dusk - Expansion Disk
Stars: ✭ 157 (+823.53%)
Mutual labels:  disk
Distributed framework
python通用分布式函数调度框架 pip install function_scheduling_distributed_framework
Stars: ✭ 123 (+623.53%)
Mutual labels:  disk
Usb Disk Ejector
A program that allows you to quickly remove drives in Windows. It can eject USB disks, Firewire disks and memory cards. It is a quick, flexible, portable alternative to using Windows' "Safely Remove Hardware" dialog.
Stars: ✭ 175 (+929.41%)
Mutual labels:  disk
Cra Build Watch
A script for create-react-app that writes development builds to the disk
Stars: ✭ 110 (+547.06%)
Mutual labels:  disk
Advanced-xv6
Modern improvements for MIT's xv6 OS
Stars: ✭ 26 (+52.94%)
Mutual labels:  disk
Torchdata
PyTorch dataset extended with map, cache etc. (tensorflow.data like)
Stars: ✭ 226 (+1229.41%)
Mutual labels:  disk
Kdiskmark
A simple open-source disk benchmark tool for Linux distros
Stars: ✭ 152 (+794.12%)
Mutual labels:  disk
Filesystem
FileSystem is an application that allows you to browse the content of your iPhone disk, displaying file and folders, files contents, and detailed informations about file and folder permissions.
Stars: ✭ 148 (+770.59%)
Mutual labels:  disk
Hd Idle
Hard Disk Idle Spin-Down Utility
Stars: ✭ 124 (+629.41%)
Mutual labels:  disk
Media Manager
A simple file browser and up-loader for Laravel written in Vue.JS
Stars: ✭ 190 (+1017.65%)
Mutual labels:  disk
Iocipher
make non-root mountable encrypted disk shares
Stars: ✭ 124 (+629.41%)
Mutual labels:  disk
Tarantool
Get your data in RAM. Get compute close to data. Enjoy the performance.
Stars: ✭ 2,787 (+16294.12%)
Mutual labels:  disk
Btree4j
Disk-based B+-tree written in Pure Java
Stars: ✭ 122 (+617.65%)
Mutual labels:  disk
Sysstat
Performance monitoring tools for Linux
Stars: ✭ 2,055 (+11988.24%)
Mutual labels:  disk
Ssd Gpu Dma
Build userspace NVMe drivers and storage applications with CUDA support
Stars: ✭ 172 (+911.76%)
Mutual labels:  disk
SSImagePicker
Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... 📸
Stars: ✭ 227 (+1235.29%)
Mutual labels:  rotate
Stressdisk
Stress test your disks / memory cards / USB sticks before trusting your valuable data to them
Stars: ✭ 238 (+1300%)
Mutual labels:  disk

多功能转盘菜单:ETurntableMenuView

写个博客也不知道怎么开头,写了四五篇了感觉写了好多,看了下字数统计我去,才1000多字我怎么感觉写了上万字呢,好吧,还有几千在脑子里没写出来。开始下文。

1. 需求

之前公司有个需求需要实现一个椭圆形大布局,实现旋转和停止时固定角度,布局的每个Item需要有个大小差,带点点视觉效果,如图。 这个比较适用于车间,TV,横屏布局的机器上,其他布局的调下参数也是一样的。

img1.png

2.怎么搞?

百度一下,看看有没有现成的,每次看到自定义View都怕,这方面确实有的不多,普通的网上应该也有,而且该经过验证的。但找了一下真没有找到这种椭圆的,没办法,没思路,还好经过艰难的,不屑的..... 百度到了两个相关的ArcPageIndicatorAndroid-CircleMenu 经过看看,看看,看看,有点识路了本控件主要是对Android-CircleMenu进行修改得出。

3.实现

  • 我个人不太想在博客里贴源码什么的,想看的可以看源码,一般都是介绍怎么用,因为类也不多比较简单。
  • 需要修改样式可以直接修改下面四个参数。
    //尽量保证最大值为1,在布局里将图片文字设置大点,放大会失真
    private float mMaxSize = 1.0f;
    private float mMinSize = 0.6f;

    //拉伸成椭圆
    private float mStretchX = 1.6f;
    private float mStretchY = 0.6f;
  • attrs 介绍
  //下面两个可以实现Item视觉差,就是最近的图片大点,最小的图片小的
  <attr name="children_max_scale" format="float"/>
  <attr name="children_min_scale" format="float"/>
  • eturntable_menu_item.xml
  修改这个可以修改,可以对每个样式进行修改,例如图片和文字的位置但不能改id名。

4.功能

  • 1.可以定义控件的个数。
  • 2.可以监听每个Item的单机事件。
  • 3.可以实现各种形状的盘子,如圆盘,椭圆盘。
  • 4.可以实现代码切换上一个,下一个的旋转。
  • 5.实现滑动时松开选择到固定角度。
  • 6.字数差不多了,不扯了,自己看,-.-。

5.使用

  //Maven
  <dependency>
    <groupId>com.wangxuan.library</groupId>
    <artifactId>eturntablemenuview</artifactId>
    <version>1.0</version>
    <type>pom</type>
  </dependency>

  //Gradle
  compile 'com.wangxuan.library:eturntablemenuview:1.0'

6.效果图

第一张图是实现了,但样式图片公司的不能公开,所以下了八个动物代替,不怎么好看,看功能就行。


七个Item时

img2.jpg


六个Item时

img3.jpg


八个Item时

img4.jpg


Gif效果

img5.gif

这个是之前写的,所以demo就不写那么多,觉得用的到可以自己再看。

7. 感谢思路来源 ArcPageIndicator和 Android-CircleMenu。

8. 源码地址

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].