/StickySnot

If you want to make your views sticky and can be dragged like snot eh...And this library will show you a some way.

Primary LanguageJava

StickySnot

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:

image

##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);
}

原理说明地址

http://blog.csdn.net/u012293381/article/details/47059737