实现正在加载中界面的Android库:DynamicBox
jopen
11年前
DynamicBox是一个Android库,能够inflates自定义布局来指示出:
- 正在加载内容
- 显示一个异常
- 或者是一个自定义视图

支持:
ListViewGridViewExpandableListViewActivityFragmentActivityFragmentLinearLayoutRelativeLayoutScrollView
示例
- 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 ...");