Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saket/InboxRecyclerView
Build expandable descendant navigation, inspired by Google Inbox
https://github.com/saket/InboxRecyclerView
gesture inbox recyclerview
Last synced: 3 months ago
JSON representation
Build expandable descendant navigation, inspired by Google Inbox
- Host: GitHub
- URL: https://github.com/saket/InboxRecyclerView
- Owner: saket
- License: apache-2.0
- Created: 2018-08-19T06:14:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T19:07:54.000Z (over 3 years ago)
- Last Synced: 2024-10-15T09:21:54.464Z (3 months ago)
- Topics: gesture, inbox, recyclerview
- Language: Kotlin
- Homepage:
- Size: 130 MB
- Stars: 1,973
- Watchers: 32
- Forks: 118
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-kotlin - InboxRecyclerView - Build expandable descendant navigation, inspired by Google Inbox (Libraries)
README
[![](https://github.com/saket/InboxRecyclerView/blob/master/docs/images/static_thumbnail.jpg)](https://www.youtube.com/playlist?list=PLY9Ajk3MUE7UAT4rn9LO-jSPfkPm5ewrQ)
`InboxRecyclerView` is a library for building expandable descendant navigation inspired by [Google Inbox](http://androidniceties.tumblr.com/post/100872004063/inbox-by-gmail-google-play-link) and [Reply](https://material.io/design/material-studies/reply.html), and is an easy drop-in into existing projects. You can take a look at the [sample app](https://github.com/saket/InboxRecyclerView/tree/master/sample) for best practices or [download its APK](https://github.com/saket/InboxRecyclerView/releases) for trying it out on your phone. If you're interested in learning how it was created, [here's an in-depth blog post](https://saket.me/inbox-recyclerview).
```groovy
implementation 'me.saket:inboxrecyclerview:3.0.0'
```### Usage
**Layout**
```xml
```
**Expanding content**
```kotlin
recyclerView.itemExpandAnimator = ItemExpandAnimator.scale() // or split() / none()
recyclerView.dimPainter = DimPainter.listAndPage(Color.WHITE, alpha = 0.65f)recyclerView.expandablePage = findViewById(...).also {
it.pushParentToolbarOnExpand(toolbar)
it.addOnPullListener(PageCollapseEligibilityHapticFeedback(it))
}recyclerViewAdapter.onItemClick = { clickedItem ->
// Load or update your content inside the page here.
recyclerView.expandItem(clickedItem.adapterId)
}
```### How do I…
- [customize item expand animations?](docs/item_animators.md)
- [control the pull-to-collapse gesture?](docs/pull_to_collapse.md)
- [change background dimming?](docs/background_dim.md)
- [listen to state changes?](docs/page_callbacks.md)
- [expand items without using `Long` based adapter IDs?](https://github.com/saket/InboxRecyclerView/wiki/Custom-expansion-keys)### Pull collapsible activities
To maintain consistency across your whole app, a `PullCollapsibleActivity` is also included that brings the same animations and gesture to activities with little effort.
Step 1. Extend `PullCollapsibleActivity`.
Step 2. Add these attributes to the activity’s theme:
```xml
true
@null
```### License
```
Copyright 2018 Saket Narayan.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 athttp://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.
```