DynamicBox

General

Category
Free
Tag
Layouts
License
N/A
Registered
Jul 5, 2014
Favorites
4
Link
https://github.com/medyo/dynamicbox
See also
StateLayout
Swipe Layout
CameleonLayout
FlowLayout
MaskableLayout

Additional

Language
Java
Version
N/A
Created
Jun 4, 2014
Updated
Mar 12, 2018 (Retired)
Owner
Mehdi Sakout (medyo)
Contributors
swanhtet1992
Mehdi Sakout (medyo)
tesla1984
MrCorporate
4
Activity
Badge
Generate
Download
Source code
APK file

Advertising

Dynamicbox

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

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

Supports:

  • ListView
  • GridView
  • ExpandableListView
  • Activity
  • FragmentActivity
  • Fragment
  • LinearLayout
  • RelativeLayout
  • ScrollView
  • FrameLayout
  • RecyclerView
  • ViewGroup
  • or any view type overriding from one of these

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 Activityview : 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 Viewbox.showLoadingLayout(); 

To Show Internet off Viewbox.showInternetOffLayout(); 

To Show Exception Viewbox.showExceptionLayout(); 

To Show a Custom ViewView customView = getLayoutInflater().inflate(R.layout.custom_view, null, false); box.addCustomView(customView,"greenmonster"); box.showCustomView("greenmonster"); 

To set Loading Messagebox.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 detailsSample