StickySnot
Introduction: 高仿 qq 的'一键下班'功能
Tags:
snotview-高仿qq消息拖拽-自定义view-If you want to make your views sticky and can be dragged like snot eh...And this library will show you a some way.
It can make ur view behave like this:

how to use
Step 1. Add the JitPack repository to your build file 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.gamedirty:StickySnot:2.1'
}
then all you need is write few codes to make your view lively。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
SnotPanel root = SnotPanel.attachToWindow(this);
root.makeViewSoft(this, R.id.snot);
root.makeViewSoft(this,R.id.lalalal);
root.makeViewSoft(this,R.id.rect);
}
原理说明地址
