Android AdapterView And RecyclerView Library


License

License

GroupId

GroupId

cn.bingoogolapple
ArtifactId

ArtifactId

bga-adapter
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

aar
Description

Description

Android AdapterView And RecyclerView Library
Android AdapterView And RecyclerView Library
Project URL

Project URL

https://github.com/bingoogolapple/BGAAdapter-Android
Source Code Management

Source Code Management

https://github.com/bingoogolapple/BGAAdapter-Android

Download bga-adapter

How to add to project

<!-- https://jarcasting.com/artifacts/cn.bingoogolapple/bga-adapter/ -->
<dependency>
    <groupId>cn.bingoogolapple</groupId>
    <artifactId>bga-adapter</artifactId>
    <version>1.2.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/cn.bingoogolapple/bga-adapter/
implementation 'cn.bingoogolapple:bga-adapter:1.2.0'
// https://jarcasting.com/artifacts/cn.bingoogolapple/bga-adapter/
implementation ("cn.bingoogolapple:bga-adapter:1.2.0")
'cn.bingoogolapple:bga-adapter:aar:1.2.0'
<dependency org="cn.bingoogolapple" name="bga-adapter" rev="1.2.0">
  <artifact name="bga-adapter" type="aar" />
</dependency>
@Grapes(
@Grab(group='cn.bingoogolapple', module='bga-adapter', version='1.2.0')
)
libraryDependencies += "cn.bingoogolapple" % "bga-adapter" % "1.2.0"
[cn.bingoogolapple/bga-adapter "1.2.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.android.databinding » library jar 1.3.1
com.android.databinding : baseLibrary jar 2.3.3
com.android.databinding » adapters jar 1.3.1

Project Modules

There are no modules declared in this project.

🏃 BGABaseAdapter-Android 🏃

目录

功能介绍

在 AdapterView 和 RecyclerView 中通用的 Adapter 和 ViewHolder。

  • BGAAdapterViewAdapter 和 BGAViewHolderHelper 用于简化 AdapterView 的子类(如 ListView、GridView)的适配器的编写
  • BGARecyclerViewAdapter 和 BGAViewHolderHelper 用于简化 RecyclerView 的适配器的编写,支持多 Item 类型,支持添加多个 Header 和 Footer,回调接口里的索引位置已经在库里处理了,不需要开发者自己减去 Header 个数
  • BGADivider 用于简化 RecyclerView 分割线的编写,以及轻松实现基于 RecyclerView 的吸顶悬浮分类索引
  • BGABindingRecyclerViewAdapter 和 BGABindingViewHolder 用于 RecyclerView 结合 DataBinding 使用时简化 RecyclerView 的适配器的编写,支持多 Item 类型,支持添加多个 Header 和 Footer,回调接口里的索引位置已经在库里处理了,不需要开发者自己减去 Header 个数
  • BGARVVerticalScrollHelper 用于将 RecyclerView 滚动到指定位置

效果图与示例 apk

简化 GridView/ListView 适配器 RecyclerView/Header/Footer/拖拽排序
adapterview rv_and_rvbinding
RecyclerView 多 ItemType 吸顶分类索引
rv_multi_item sticky
仿美团外卖点餐界面左右联动
cascade

点击下载 BGABaseAdapterDemo.apk 或扫描下面的二维码安装

BGABaseAdapterDemo apk文件二维码

使用

Gradle 依赖

  • maven { url 'https://jitpack.io' } 添加到 root build.gradle 的 repositories 中
  • 在 app build.gradle 中添加如下依赖,末尾的「latestVersion」指的是徽章Download里的版本名称,请自行替换
implementation 'androidx.recyclerview:recyclerview:latestVersion'
implementation 'com.github.bingoogolapple:BGABaseAdapter-Android:latestVersion'

简化 AdapterView 的子类(如 ListView、GridView)的适配器的编写

AdapterViewAdapter.java

简化 RecyclerView 的适配器的编写

RvAdapter.java

RecyclerView 结合 DataBinding 使用时简化 RecyclerView 的适配器的编写

RvBindingFragment.java

BGADivider 用于简化 RecyclerView 分割线的编写,以及轻松实现基于 RecyclerView 的悬浮分类索引

RvStickyFragment.java

仿美团外卖点餐界面左右联动

RvCascadeFragment.java

代码是最好的老师,详细用法请查看 demo 🐾

感谢

关于我

个人主页 邮箱 BGA系列开源库QQ群
bingoogolapple.cn [email protected] BGA_CODE_CLUB

打赏支持

如果您觉得 BGA 系列开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 🐵 就太 👍 了。您的支持将鼓励我继续创作:octocat:

如果您目前正打算购买通往墙外的梯子,可以使用我的邀请码「YFQ9Q3B」购买 Lantern,双方都赠送三个月的专业版使用时间 🍻

License

Copyright 2015 bingoogolapple

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.

Versions

Version
1.2.0
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0