Home

Awesome

嵌套滚动布局

集成步骤

allprojects {
    repositories {
        // JitPack 远程仓库:https://jitpack.io
        maven { url 'https://jitpack.io' }
    }
}
dependencyResolutionManagement {
    repositories {
        // JitPack 远程仓库:https://jitpack.io
        maven { url 'https://jitpack.io' }
    }
}
android {
    // 支持 JDK 1.8 及以上
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    // 嵌套滚动布局:https://github.com/getActivity/NestedScrollLayout
    implementation 'com.github.getActivity:NestedScrollLayout:2.0'
}

AndroidX 兼容

# 表示将第三方库迁移到 AndroidX
android.enableJetifier = true

框架用法

<com.hjq.nested.scroll.layout.NestedScrollWebView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
<com.hjq.nested.scroll.layout.NestedScrollFrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    
</com.hjq.nested.scroll.layout.NestedScrollFrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<com.hjq.nested.scroll.layout.NestedScrollLinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

</com.hjq.nested.scroll.layout.NestedScrollLinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<com.hjq.nested.scroll.layout.NestedScrollRelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

</com.hjq.nested.scroll.layout.NestedScrollRelativeLayout>
<com.hjq.nested.scroll.layout.NestedScrollViewPager
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" />

开源项目列表

微信公众号:Android轮子哥

Android 技术 Q 群:10047167

如果您觉得我的开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 :monkey_face:就太:thumbsup:了。您的支持将鼓励我继续创作:octocat:(点击查看捐赠列表

广告区

【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中

【腾讯云】中小企业福利专场,多款刚需产品,满足企业通用场景需求

License

Copyright 2018 Huang JinQun

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.