Search in sources :

Example 1 with CustomEmptyView

use of com.hotbitmapgg.bilibili.widget.CustomEmptyView in project bilibili-android-client by HotBitmapGG.

the class OffLineDownloadActivity method initViews.

@Override
public void initViews(Bundle savedInstanceState) {
    long phoneTotalSize = CommonUtil.getPhoneTotalSize();
    long phoneAvailableSize = CommonUtil.getPhoneAvailableSize();
    //转换为G的显示单位
    String totalSizeStr = Formatter.formatFileSize(this, phoneTotalSize);
    String availabSizeStr = Formatter.formatFileSize(this, phoneAvailableSize);
    //计算占用空间的百分比
    int progress = countProgress(phoneTotalSize, phoneAvailableSize);
    mProgressBar.setProgress(progress);
    mCacheSize.setText("主存储:" + totalSizeStr + "/" + "可用:" + availabSizeStr);
    CustomEmptyView mEmptyLayout = (CustomEmptyView) findViewById(R.id.empty_layout);
    assert mEmptyLayout != null;
    mEmptyLayout.setEmptyImage(R.drawable.img_tips_error_no_downloads);
    mEmptyLayout.setEmptyText("没有找到你的缓存哟");
}
Also used : CustomEmptyView(com.hotbitmapgg.bilibili.widget.CustomEmptyView)

Aggregations

CustomEmptyView (com.hotbitmapgg.bilibili.widget.CustomEmptyView)1