實現正在加載中界面的Android庫:DynamicBox
DynamicBox是一個Android庫,能夠inflates自定義布局來指示出:
- 正在加載內容
- 顯示一個異常
- 或者是一個自定義視圖 </ul>
ListView
GridView
ExpandableListView
Activity
FragmentActivity
Fragment
LinearLayout
RelativeLayout
ScrollView
- 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 ...");
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!