Steppers


Source link: https://github.com/drozdzynski/Steppers

Steppers

Screen

Setup

1. Add library to project

Grab via Gradle:

dependencies {

  compile 'me.drozdzynski.library.steppers:steppers:1.0.0' 
}

Manual

  • Download the library folder.
  • Copy to root project folder
  • Add to your settings.gradle file the following code line: "include ':app', ':steppers'"
  • Rebuild the project
  • Add dependency
    • File → Project Structure
    • in Modules section click on "app"
    • Click on tab "Dependecies"
    • Click on the green plus
    • Module Dependecy
    • Select ":library"
  • Done

2. Add view in XML Layout

<me.drozdzynski.library.steppers.SteppersView
  android:id="@+id/steppersView"
  android:layout_width="match_parent"
  android:layout_height="match_parent"/>

3. Setup config for SteppersView

SteppersView.Config steppersViewConfig = new SteppersView.Config();
 steppersViewConfig.setOnFinishAction(new OnFinishAction() {

  @Override
  public void onFinish() {

// Action on last step Finish button
  
}
 
}
);
  steppersViewConfig.setOnCancelAction(new OnCancelAction() {

  @Override
  public void onCancel() {

// Action when click cancel on one of steps
  
}
 
}
);
  steppersViewConfig.setOnChangeStepAction(new OnChangeStepAction() {

  @Override
  public void onChangeStep(int position, SteppersItem activeStep) {

// Action when click continue on each step
  
}
 
}
);
  // Setup Support Fragment Manager for fragments in steps steppersViewConfig.setFragmentManager(getSupportFragmentManager());

4. Create steps list

ArrayList<SteppersItem> steps = new ArrayList<>();
  SteppersItem stepFirst = new SteppersItem();
  stepFirst.setLabel("Title of step");
 stepFirst.setSubLabel("Subtitle of step");
 stepFirst.setFragment(new SomeFragment());
 stepFirst.setPositiveButtonEnable(false);
  steps.add(stepFirst);

5. Set config, list and build view;

SteppersView steppersView = (SteppersView) findViewById(R.id.steppersView);
 steppersView.setConfig(steppersViewConfig);
 steppersView.setItems(steps);
 steppersView.build();

Other functions

Enable skip step button

Simple:

item.setSkippable(true);

With callback:

item.setSkippable(true, new OnSkipStepAction() {

  @Override
  public void onSkipStep() {

// Some action after step is skipped
  
}
 
}
);

Override continue button

item.setOnClickContinue(new OnClickContinue() {

  @Override
  public void onClick() {

// Some action on click

steppersView.nextStep();
 // Now You must call next step
  
}
 
}
);

Change active step

steppersView.setActiveItem(1);
 // step index from 0 

Disable cancel button (hide)

steppersViewConfig.setCancelAvailable(false);

License

Copyright (C) 2015-2017 Krystian Dro?d?y?ski  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. 

Resources

Another sliding menu base on DrawerLayout.

AutoTypeTextView is simple library which add encryption, decryption and texting animations.

Android library allowing to preserve instance of any object across orientation changes.

Android Library for auto-formatting money on EditText.

Restito is a tool which is inspired by mockito and functionally is diametrically opposite to the Rest Assured.

Restito provides a DSL to:

  • Mimic rest server behavior
  • Record HTTP calls to the server
  • Perform verification against happened calls

Testing and validation of REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of using these languages into the Java domain.

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