Coder Social home page Coder Social logo

syedalinaqi / dynamicbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from medyo/dynamicbox

1.0 1.0 0.0 623 KB

DynamicBox is a library which inflates custom layouts to indicate : loading content, show an exception or even a custom view.

Java 100.00%

dynamicbox's Introduction

Dynamicbox

Icon

DynamicBox is a library which inflates custom layouts to indicate :

  • loading content
  • show an exception
  • or even a custom view.

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

demo 1 demo 4 demo 5 demo 2 demo 3

Supports:

  • ListView
  • GridView
  • ExpandableListView
  • Activity
  • FragmentActivity
  • Fragment
  • LinearLayout
  • RelativeLayout
  • ScrollView

Including in your project : Gradle

      compile project(':DynamicBox')
   }```

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
---------------------

- View

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


- Layout id

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 ...");


See the example project for more details : [Sample](raw/master/DynamicBoxExample/src/main/java/mehdi/sakout/dynamicboxexample/)

Apps using DynamicBox  
---------------------   
[![ElBotola](https://raw.github.com/medyo/dynamicbox/master/screenshots/apps/com.mobiacube.elbotola.png)](https://play.google.com/store/apps/details?id=com.mobiacube.elbotola)  

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

Developed By
---------------------
El Mehdi Sakout <[email protected]>

Resources
---------------------
Thanks to [IconKa](http://www.iconka.com) for the cat icon.

License
---------------------

MIT  
[http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)

dynamicbox's People

Contributors

mrcorporate avatar medyo avatar swanhtet1992 avatar

Stargazers

Syed Ali Naqi avatar

Watchers

Syed Ali Naqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.