Home

Awesome

Dynamicbox

Deprecated, Please refer the new implementation at: https://github.com/medyo/StateViews

Icon

DynamicBox is a library which inflates custom layouts to indicate :

The philosophy behind this library is to improve the UX through informing the user about what's happening behind, if the data is loading or an exception is thrown while fetching data...

Screenshots

<img src="https://raw.github.com/medyo/dynamicbox/master/screenshots/demo_popcorn_loading.png" alt="Popcorn Screen shot" width="250"> <img src="https://raw.github.com/medyo/dynamicbox/master/screenshots/demo_gplay_no_internet.png" alt="Google play screen shot" width="250"> <img src="https://raw.github.com/medyo/dynamicbox/master/screenshots/demo_slack_loading.png" alt="Slack screen shot" width="250"> <img src="https://raw.github.com/medyo/dynamicbox/master/screenshots/demo_gmail_no_messages.png" alt="Gmail screen shot" width="250">

Supports:

Including in your project : Maven Central

compile 'com.github.medyo:dynamicbox:1.2@aar'

Usage

DynamicBox box = new DynamicBox(this,view);

this : refers to the current Activity
view : refers to the target view, eg a ListView or a layout

Example

ListView lv = (ListView)findViewById(R.id.listView);    
DynamicBox box = new DynamicBox(this,lv);
DynamicBox box = new DynamicBox(this,R.layout.activity_activity);

To Show the loading View

box.showLoadingLayout();

To Show Internet off View

box.showInternetOffLayout();

To Show Exception View

box.showExceptionLayout();

To Show a Custom View

View customView = getLayoutInflater().inflate(R.layout.custom_view, null, false);
box.addCustomView(customView,"greenmonster");
box.showCustomView("greenmonster");

To set Loading Message

box.setLoadingMessage("Loading your music ...");

To Override Strings Please refer to strings.xml variables

To Override Default style Please refer to styles.xml

To Override Default Layouts Please refer to res/layouts

See the example project for more details Sample

Apps using DynamicBox

ElBotola

Feel free to shoot me an email if your app is using it

Developed By

El Mehdi Sakout elmehdi.sakout@gmail.com

Resources

Thanks to IconKa for the cat icon.

License

MIT
http://opensource.org/licenses/MIT