Code Monkey home page Code Monkey logo

scrollablelayout's Introduction

共同头部+ViewPager+ListView(AdapterView)|RecyclerView|ScrollView|WebView
blog:http://blog.csdn.net/w7822938/article/details/47173047
安装包放在/demo-apk,可以直接安装看效果

UPDATE NOTE:

2015/12/18: 添加对WebView的支持.
2015/12/11: 添加canPtr()方法,支持下拉刷新(demo以android-Ultra-Pull-To-Refresh为例.
2015/8/31:
添加对RecyclerView的支持.

效果如下:

Usage

dependencies {
	compile 'com.github.cpoopc:scrollablelayoutlib:1.0.1' // 目前只发布到jcenter
}

1.xml

<com.cpoopc.scrollablelayoutlib.ScrollableLayout
        android:id="@+id/scrollableLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
<-- header -->
  <-- header example -->
        <RelativeLayout
            android:id="@+id/rl_head"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#cdcdcd">
        </RelativeLayout>
  <-- header example -->

<-- content View -->
  <-- content View example -->
        <com.astuetz.PagerSlidingTabStrip
            android:id="@+id/pagerStrip"
            android:layout_width="match_parent"
            android:layout_height="@dimen/tab_height"
            android:layout_alignParentBottom="true" />
        <android.support.v4.view.ViewPager
            android:id="@+id/viewpager"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
  <-- content View example -->

    </com.cpoopc.scrollablelayoutlib.ScrollableLayout>

2.xxFragment|xxView|.. implements ScrollableHelper.ScrollableContainer

@Override
    public View getScrollableView() {
        return scrollView;
    }

3.设置当前container

mScrollLayout.getHelper().setCurrentScrollableContainer(scrollableContainer)

scrollablelayout's People

Contributors

cpoopc avatar

Watchers

James Cloos avatar  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.