Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

FuckingVolumeSlider

源码GitHub地址,设计来自于该贴内

前几天看到一个反人类音量滑动条设计的有趣帖子原帖地址,网友设计了各种反人类的滑动条(这些脑洞我是服气的!),于是我抽空在 android 上面实现了一个其中比较有趣的设计,点击喇叭弹射出去圆点控制音量。在写这个控件的时候遇到的一些知识点分享给大家。视频演示地址

效果图:

Gradle

Step 1. Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
	    compile 'com.github.shellljx:TagViewGroup:-SNAPSHOT'
}

使用方法

1. Define in xml

<com.licrafter.library.VolumeSliderView
    android:id="@+id/sliderView"
    android:layout_width="300dp"
    android:layout_height="wrap_content"/>

2. Set Listener

mSliderView = (VolumeSliderView) findViewById(R.id.sliderView);

mSliderView.setOnVolumeSlideListener(new VolumeSliderView.OnVolumeSlideListener() {
    @Override
    public void result(int volume) {
        mTextView.setText("音量: " + volume);
    }
});

原理

控件实现思路

About

android实现的反人类音量滑块

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.