Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/medyo/Dynamicbox
Android library to show Loading view when waiting for initial state
https://github.com/medyo/Dynamicbox
Last synced: 3 months ago
JSON representation
Android library to show Loading view when waiting for initial state
- Host: GitHub
- URL: https://github.com/medyo/Dynamicbox
- Owner: medyo
- Archived: true
- Created: 2014-06-03T23:07:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T14:52:27.000Z (almost 7 years ago)
- Last Synced: 2024-02-29T18:33:47.333Z (11 months ago)
- Language: Java
- Homepage:
- Size: 534 KB
- Stars: 453
- Watchers: 34
- Forks: 89
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - Dynamicbox - Android library to show Loading view when waiting for initial state (etc)
- awesome - Dynamicbox - Android library to show Loading view when waiting for initial state (etc)
README
Dynamicbox
==========# Deprecated, Please refer the new implementation at: https://github.com/medyo/StateViews
![Icon](https://raw.github.com/medyo/dynamicbox/master/screenshots/cat-box-icon.png "Dynamic Box")
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 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 ...");
```**To Override Strings**
Please refer to [strings.xml variables](DynamicBox/src/main/res/values/strings.xml)**To Override Default style**
Please refer to [styles.xml](DynamicBox/src/main/res/values/styles.xml)**To Override Default Layouts**
Please refer to [res/layouts](DynamicBox/src/main/res/layout/)**See the example project for more details** [Sample](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 SakoutResources
---------------------
Thanks to [IconKa](http://www.iconka.com) for the cat icon.License
---------------------MIT
[http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)