Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VictorAlbertos/BreadcrumbsView
A customizable Android view for paginated forms
https://github.com/VictorAlbertos/BreadcrumbsView
Last synced: 1 day ago
JSON representation
A customizable Android view for paginated forms
- Host: GitHub
- URL: https://github.com/VictorAlbertos/BreadcrumbsView
- Owner: VictorAlbertos
- License: apache-2.0
- Created: 2016-10-07T12:58:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-09T10:03:01.000Z (about 4 years ago)
- Last Synced: 2024-08-02T19:33:21.014Z (3 months ago)
- Language: Java
- Homepage:
- Size: 134 KB
- Stars: 683
- Watchers: 14
- Forks: 101
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-list - VictorAlbertos/BreadcrumbsView - A customizable Android view for paginated forms (Java)
- awesome-github-android-ui - BreadcrumbsView - 显示给定序列的当前步骤 (StepView)
README
# BreadcrumbsView
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-BreadcrumbsView-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/4475)
A customizable Android view which shows the current step of a given series. Its main purpose is to provide a contextual reference for paginated forms.
![Screenshots](breadcrumbs.gif)
## SetUp
Add to top level *gradle.build* file
```gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
```Add to app module *gradle.build* file
```gradle
dependencies {
compile 'com.github.VictorAlbertos:BreadcrumbsView:0.0.4'
}
```## Usage
### XML inflation
Define a `BreadcrumbsView` in xml layout as follows:```xml
```
Among the previous custom attributes, only `app:numberOfSteps` is mandatory, requiring to be an integer value greater than 1.
### Moving between steps
Once instantiated the instance of `BreadcrumbsView`, use `breadcrumbs.nextStep()` to move to the next step, and `breadcrumbs.prevStep()` to move to the previous one. If not steps are left to move backward or forward, an `IndexOutOfBoundsException` is thrown.### Survive config changes
In order to retain the current step between config changes, use `breadcrumbs.setCurrentStep(int)`. You must call it before the view is measured. Otherwise, it throws an `IllegalStateException`.### Examples
The module [test-sample](https://github.com/VictorAlbertos/BreadcrumbsView/tree/master/test-sample) contains both a minimal example and a UI test driven by Espresso.