Giter Site home page Giter Site logo

kugoulayout's Introduction

KugouLayout

an interesting layout

一个模仿酷狗播放器滑动返回的layout

可以让你的app有更丰富 便捷的手势操作

支持activity滑动返回和普通layout的滑动 显示/隐藏 两种模式,可以参考demo里面的Activity1和Acitivyt2

有喜欢KugouLayout的朋友 Star一下哦

个人建议使用场景

用于activity的滑动返回

需要使用网络加载要长时间等待的activity,可以用KugouLayout加入摇屏功能,让用户可以在等待加载期间拽一拽屏幕

and...

ScreenShot

图片较大 加载会慢一些 耐心等待

Demo Activity1

image

Demo Activity2

image

Usage

###Activity滑动返回

<!--设置主题属性-->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowIsTranslucent">true</item>
</style>

kugouLayout = new KugouLayout(this);
//依附到activity 控制屏幕滑动
kugouLayout.attach(this);
//需要保护kugoulayout内横向滑动事件的view添加到这里
kugouLayout.addHorizontalScrollableView(findViewById(R.id.horizontalScrollView));

###普通layout的滑动隐藏于显示

//设置要显示的内容即可
kugouLayout.setContentView(R.layout.activity_main);

Me

QQ:344696734

weibo: http://weibo.com/u/1845905190

kugoulayout's People

Contributors

zhaozhentao avatar

Watchers

Michael jentsch avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.