BreadcrumbsView


Source link: https://github.com/VictorAlbertos/BreadcrumbsView

BreadcrumbsView

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.

SetUp

Add to top level gradle.build file

allprojects {

  repositories {

maven {
 url "https://jitpack.io" 
}

  
}
 
}

Add to app module gradle.build file

dependencies {

  compile 'com.github.VictorAlbertos:BreadcrumbsView:0.0.3' 
}

Usage

XML inflation

Define a BreadcrumbsView in xml layout as follows:

  <io.victoralbertos.breadcumbs_view.BreadcrumbsView

 android:id="@+id/breadcrumbs"

 android:layout_width="match_parent"

 android:layout_height="wrap_content"

 app:numberOfSteps="5"

 app:visitedStepBorderDotColor="@color/colorVisited"

 app:visitedStepFillDotColor="@color/colorVisited"

 app:nextStepBorderDotColor="@color/colorNext"

 app:nextStepFillDotColor="@color/colorNext"

 app:visitedStepSeparatorColor="@color/colorVisited"

 app:nextStepSeparatorColor="@color/colorNext"

 app:radiusDot="@dimen/radius_dot"

 app:sizeDotBorder="@dimen/size_dot_border"

 app:heightSeparator="@dimen/height_separator"/>

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 contains both a minimal example and a UI test driven by Espresso.

Resources

A simple View that works like a switch, but with more customizations and the possibility to choose between two or three states and different designs

An annotation processor library which generates gson type adapters at compile time which also use basic JsonPath functionality.

An annotation based tool for saving and restoring instance states.

Medium android application displays content with text, image, video etc in post detail. Medium Textview allows to do the same.

A simple library for building beautiful login buttons.

MIDI library for Android.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes