All Projects → vlonjatg → Progress Activity

vlonjatg / Progress Activity

Easily add loading, empty and error states in your app.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Progress Activity

Stateviews
Create & Show progress, data or error views, the easy way!
Stars: ✭ 367 (-64.68%)
Mutual labels:  error-handling, progress-bar
progress-bar-log
A component to display a progress bar and last X logs at the same time.
Stars: ✭ 44 (-95.77%)
Mutual labels:  progress-bar, error-handling
React Redux Loading Bar
Loading Bar (aka Progress Bar) for Redux and React
Stars: ✭ 894 (-13.96%)
Mutual labels:  progress-bar
Friendly Exception
An interface for an exception to be friendly
Stars: ✭ 41 (-96.05%)
Mutual labels:  error-handling
Statusprovider
Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views
Stars: ✭ 879 (-15.4%)
Mutual labels:  error-handling
Thoth
An Error Logger for Go
Stars: ✭ 22 (-97.88%)
Mutual labels:  error-handling
Rbdl Orb
RBDL - Rigid Body Dynamics Library - ORB Version - The two main differences to the original rbdl is that this version has error handling and uses polymorphism for constraints
Stars: ✭ 33 (-96.82%)
Mutual labels:  error-handling
Circular Music Progressbar
Beautiful Circular Progress Bar with album art for android
Stars: ✭ 813 (-21.75%)
Mutual labels:  progress-bar
Bugsnag Android Ndk
DEPRECATED - this project now lives at bugsnag/bugsnag-android
Stars: ✭ 42 (-95.96%)
Mutual labels:  error-handling
Await Handler
Basic wrapper for await that allows handling of errors without try/catch blocks
Stars: ✭ 13 (-98.75%)
Mutual labels:  error-handling
Happy
the alchemist's happy path with elixir
Stars: ✭ 37 (-96.44%)
Mutual labels:  error-handling
Flutterplayground
Playground app for Flutter
Stars: ✭ 859 (-17.32%)
Mutual labels:  progress-bar
Supreme
A command line visual file manager for linux
Stars: ✭ 22 (-97.88%)
Mutual labels:  progress-bar
Perhaps
A monad, perhaps.
Stars: ✭ 35 (-96.63%)
Mutual labels:  error-handling
Roundprogresstextview
TextView with Round Pogress
Stars: ✭ 18 (-98.27%)
Mutual labels:  progress-bar
Rollbar Android
Rollbar for Android
Stars: ✭ 41 (-96.05%)
Mutual labels:  error-handling
Error Overlay Webpack Plugin
Catch errors with style 💥✨
Stars: ✭ 821 (-20.98%)
Mutual labels:  error-handling
Pbmcapply
Tracking the progress of mc*apply with progress bar.
Stars: ✭ 25 (-97.59%)
Mutual labels:  progress-bar
Whoops
PSR-15 middleware to use Whoops as error handler
Stars: ✭ 29 (-97.21%)
Mutual labels:  error-handling
Bashful
Use a yaml file to stitch together commands and bash snippits and run them with a bit of style. Why? Because your bash script should be quiet and shy-like (...and not such a loud mouth).
Stars: ✭ 1,018 (-2.02%)
Mutual labels:  progress-bar

Android Arsenal

progress-activity

If you are tired of constantly having to set up progress bars, empty views and error views, than this library is for you.

About

Using progress-activity you can easily add states like:

  • progress bar while the content is loading,
  • empty view to indicate when there are no data to display,
  • error view to indicate when something goes wrong with a button to try again.

Screenshots

Features

  • show/hide progress bar,
  • show/hide empty view,
  • show/hide error view,
  • show content when the data is ready to be displayed,

Usage

Add com.vlonjatg.progressactivity.ProgressFrameLayout or com.vlonjatg.progressactivity.ProgressLinearLayout or com.vlonjatg.progressactivity.ProgressRelativeLayout to your layout depending on your usecase:

<com.vlonjatg.progressactivity.ProgressRelativeLayout
	android:id="@+id/progressActivity"
    android:layout_width="match_parent"
	android:layout_height="match_parent"
    android:layout_below="@+id/activityToolbar"
    progressActivity:loadingBackgroundColor="#FFFFFF"
    progressActivity:emptyBackgroundColor="#fbc02d"
    progressActivity:errorBackgroundColor="#42a5f5">
    
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:text="@string/hello_world" />

    </com.vlonjatg.progressactivity.ProgressRelativeLayout>

Then in your code:

To display the loading view:

progressActivity.showLoading();

To display the empty view:

progressActivity.showEmpty(emptyDrawable, "Empty Shopping Cart", 
		"Please add things in the cart to continue.");

To display the error view:

progressActivity.showError(errorDrawable, "No Connection",
		"We could not establish a connection with our servers. Try again when you are connected to the interne.",
        "Try Again", errorClickListener);

To show the content, use:

progressActivity.showContent()

Get It

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

dependencies {
        compile 'com.github.vlonjatg:progress-activity:2.0.5'
}

Customization

There are a bunch of attributes to customize the views.

<attr name="loadingProgressBarWidth" format="dimension"/>
<attr name="loadingProgressBarHeight" format="dimension"/>
<attr name="loadingProgressBarColor" format="color"/>
<attr name="loadingBackgroundColor" format="color"/>

<attr name="emptyImageWidth" format="dimension"/>
<attr name="emptyImageHeight" format="dimension"/>
<attr name="emptyTitleTextSize" format="dimension"/>
<attr name="emptyContentTextSize" format="dimension"/>
<attr name="emptyTitleTextColor" format="color"/>
<attr name="emptyContentTextColor" format="color"/>
<attr name="emptyBackgroundColor" format="color"/>

<attr name="errorImageWidth" format="dimension"/>
<attr name="errorImageHeight" format="dimension"/>
<attr name="errorTitleTextSize" format="dimension"/>
<attr name="errorContentTextSize" format="dimension"/>
<attr name="errorTitleTextColor" format="color"/>
<attr name="errorContentTextColor" format="color"/>
<attr name="errorButtonTextColor" format="color"/>
<attr name="errorButtonBackgroundColor" format="color"/>
<attr name="errorBackgroundColor" format="color"/>

Example

An example is available.

Developed By

Vlonjat Gashi - Twitter

Attributes

This library is inspired by AndroidProgressLayout library from Anton Krasov.

License

progress-activity is available under the MIT licence.

The MIT License (MIT)

Copyright (c) 2015 Vlonjat Gashi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].