Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrielcafe/krumbsview
🍞 The ultimate breadcrumbs view for Android!
https://github.com/adrielcafe/krumbsview
android android-library android-ui android-view breadcrumb breadcrumb-navigation breadcrumbs kotlin kotlin-android kotlin-library
Last synced: 6 days ago
JSON representation
🍞 The ultimate breadcrumbs view for Android!
- Host: GitHub
- URL: https://github.com/adrielcafe/krumbsview
- Owner: adrielcafe
- License: mit
- Created: 2019-02-19T21:30:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-09T01:36:41.000Z (over 3 years ago)
- Last Synced: 2024-08-01T19:46:20.110Z (4 months ago)
- Topics: android, android-library, android-ui, android-view, breadcrumb, breadcrumb-navigation, breadcrumbs, kotlin, kotlin-android, kotlin-library
- Language: Kotlin
- Homepage:
- Size: 2.04 MB
- Stars: 186
- Watchers: 6
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- awesome-list - adrielcafe/krumbsview - 🍞 The ultimate breadcrumbs view for Android! (Kotlin)
README
[![JitPack](https://jitpack.io/v/adrielcafe/KrumbsView.svg)](https://jitpack.io/#adrielcafe/KrumbsView)
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-KrumbsView-green.svg?style=flat)]( https://android-arsenal.com/details/1/7562)# KrumbsView
The ultimate breadcrumbs view for Android!Inspired by [JotterPad](https://play.google.com/store/apps/details?id=com.jotterpad.x)'s breadcrumbs.
Features:
- [X] Custom typeface (from /assets and /res/font folders, also works with [Downloadable Fonts](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts))
- [X] Customisable (text colors, text size, separator icon)
- [X] Cool animations
- [X] Swipe right to go back to the previous item
- [X] Survive Activity recreations
- [X] Extensible (open classes and protected members, extend it to get the job done!)## How to use
### Import to your project
First, add it in your root build.gradle at the end of repositories:
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```Next, add the dependency to your app modules:
```gradle
dependencies {
...
implementation 'com.github.adrielcafe:krumbsview:$latestVersion'
}
```#### Current version:
[![JitPack](https://jitpack.io/v/adrielcafe/KrumbsView.svg)](https://jitpack.io/#adrielcafe/KrumbsView)
### XML
```xml```
Example:
```xml```
### Kotlin/Java
```kotlin
with(krumbsView){
size
getItems()
getCurrentItem()
addItem(Krumb("Lorem Ipsum"))
removeLastItem()
removeAllItems()
goToFirstItem()
setOnPreviousItemClickListener { /* ... */ } // Swipe right also triggers this listener
// All XML options are available
setTypeface("fonts/quicksand.ttf") // From /assets folder
setTypeface(R.font.quicksand) // From /res/font folder
setTypeface(MyCustomTypeface)
setTextSizeSp(20f)
setTextSizePx(40f)
setBoldText(true)
setPaddingStartItem(10f)
setPreviousItemCharacters(2)
setCurrentItemTextColor(Color.WHITE)
setPreviousItemTextColor(color(R.color.transparent_white))
setSeparatorTintColor(color(R.color.transparent_white))
setSeparatorIcon(R.drawable.ic_keyboard_arrow_right)
setAnimationType(KrumbsAnimationType.GROW_SHRINK)
setAnimationDuration(KrumbsAnimationDuration.SHORT)
}
```You can also use your custom Krumb implementation:
```kotlin
data class MyKrumb(val id: Int,
val folderName: String,
val createdAt: Date) : Krumb(folderName)with(krumbsView){
addItem(MyKrumb(123, "Folder XYZ", now))val myKrumb = getCurrentItem() as MyKrumb
}
```