BasoProgressView


Source link: https://github.com/gitsindonesia/baso

Baso Progress View

ProgressBar with button and text below it.

## Sample Usage ### XML Layout #### Without styles.xml ``` ``` #### With styles.xml ``` ``` ``` <style name="BasoCustom"> #FFF Something happened 18sp Try Again Loading @drawable/baso_sample_error 160dp </style> ```

How to start and stop the progress

Start the progress

final BasoProgressView basoProgressView = (BasoProgressView) findViewById(R.id.baso_ProgressView);

 basoProgressView.startProgress();
 

Stop progress and show the button

The button will be automatically visible if you had written baso_finishButtonText on xml layout. Once you have completed the action and you wanted to stop the progress and show a message (or error message), you can just call stop or stopAndError method.

// set message on the TextView or you can set baso_finishText on your xml layout. basoProgressView.setFinishedText("Something happened");
  // stop the progress basoProgressView.stop();
 

Or you can simply call stopAndError.

basoProgressView.stopAndError("Oops. Something happened.");
 

Stop progress and show both image and button

You have to declare baso_finishSrc either on your xml layout or programmatically with setFinishedImageResource method.

basoProgressView.setFinishedImageResource(R.drawable.baso_sample_error);
 basoProgressView.stopAndError("Oops. Something happened.");
 

Complete the progress and make it invisible

Once you have completed the action and you wanted to hide BasoProgressView, you can just call stopAndGone and use startProgress to start progressing again.

basoProgressView.stopAndGone();
 

Set the button click listener

Don't forget to create click listener for the button.

basoProgressView.setOnButtonClickListener(new View.OnClickListener() {

  @Override
  public void onClick(View v) {

basoProgressView.startProgress();

//TODO: your action here such as call api
  
}
 
}
);
 

For complete sample usage, you can take a look at the sample project.

Install

dependencies {

 compile 'id.gits:baso:1.0' 
}
 

About GITS Indonesia

GITS Indonesia has been active in IT Industry since 2010. Since then, we have developed a lot of applications, both initiative projects and client requests. Our developers are familiar with desktop, website, and mobile programming, but we are currently focusing in mobile.

http://gits.co.id

License

Copyright 2016 GITS Indonesia.  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

Side Menu project allows to create side menu with some categories to choose.

Camera module for Android applications.

MonkeyEngine is a 3D game engine for adventurous Java developers. It’s open source, cross platform and cutting edge. And it is all beautifully documented.

Kirai - flavored Android string formatting. Library has fluent API similar to phrase with additional formatting similar to TaggerString and allows to add formatted pieces of text like BabushkaText.

Kirai means phrase in Swahili language.

NetworkEvents is Android library listening network connection state and change of the Wi-Fi signal strength.

It is able to detect ConnectivityStatus when it changes:

  • WIFI_CONNECTED
  • WIFICONNECTEDHAS_INTERNET
  • WIFICONNECTEDHASNOINTERNET
  • MOBILE_CONNECTED
  • OFFLINE

In addition it is able to detect situation when strength of the Wi-Fi signal was changed with WifiSignalStrengthChanged event.

WeatherIconView is an Android library providing custom view for displaying weather icon.

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