当前位置: 首页>>代码示例>>Java>>正文


Java KProgressHUD类代码示例

本文整理汇总了Java中com.kaopiz.kprogresshud.KProgressHUD的典型用法代码示例。如果您正苦于以下问题:Java KProgressHUD类的具体用法?Java KProgressHUD怎么用?Java KProgressHUD使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


KProgressHUD类属于com.kaopiz.kprogresshud包,在下文中一共展示了KProgressHUD类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clearCache

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
/**
     * 清除缓存
     */
    private void clearCache() {
        // 清理新闻json数据 - 不清理json数据
//        NewsDALManager.shared.clearCache();

        // Fresco清除图片缓存
        ImagePipeline imagePipeline = Fresco.getImagePipeline();
        imagePipeline.clearCaches();

        // 清除缓存目录 - 清除所有缓存目录文件
        FileCacheUtils.clearAllCache(mContext);

        final KProgressHUD hud = ProgressHUD.show(mContext, "正在清理...");
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                hud.dismiss();
                ProgressHUD.showInfo(mContext, "清理缓存完成");
            }
        }, 2000);

    }
 
开发者ID:6ag,项目名称:LiuAGeAndroid,代码行数:25,代码来源:MainActivity.java

示例2: clearCache

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
/**
     * 清除缓存
     */
    private void clearCache() {
        // 清理新闻json数据 - 不清理json数据
//        NewsDALManager.shared.clearCache();

        // Fresco清除图片缓存
        ImagePipeline imagePipeline = Fresco.getImagePipeline();
        imagePipeline.clearCaches();

        // 清除缓存目录 - 清除所有缓存目录文件
        FileCacheUtils.clearAllCache(mContext);

        final KProgressHUD hud = ProgressHUD.show(mContext, "正在清理...");
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                hud.dismiss();
                ProgressHUD.showInfo(mContext, "清理缓存完成");
                cacheTextView.setText(FileCacheUtils.getTotalCacheSize(mContext));
            }
        }, 2000);

    }
 
开发者ID:6ag,项目名称:BaoKanAndroid,代码行数:26,代码来源:ProfileFragment.java

示例3: onCreate

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_search);
    ButterKnife.bind(this);

    mHud = KProgressHUD.create(this)
            .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
            .setLabel("正在拼命加载中...")
            .setDimAmount(0.5f);

    handleIntent();

    mPresenter = new SearchPresenter(this, this);

    initRecylerViews();

    mRlBack.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            finish();
        }
    });

    // 获取电影分类信息
    mPresenter.getMovieTypeList();
    // 根据条件进行筛选电影
    mPresenter.getClassifySearchList(offset, catId, sourceId, yearId, sortId);

}
 
开发者ID:coderwjq,项目名称:ZhaZhaShop,代码行数:31,代码来源:SearchActivity.java

示例4: handleBtnRegistClick

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
private void handleBtnRegistClick() {
    mHud = KProgressHUD.create(this)
            .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
            .setLabel("正在请求服务器...")
            .setDimAmount(0.5f);
    mHud.show();
    scheduleDismiss();
}
 
开发者ID:coderwjq,项目名称:ZhaZhaShop,代码行数:9,代码来源:RegistActivity.java

示例5: initProgress

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
/**
 * 初始化重新连接进度条
 */
private void initProgress(){
    mProgress = KProgressHUD.create(getContext())
            .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
            .setCancellable(true)
            .setAnimationSpeed(2)
            .setDimAmount(0.5f)
            .setLabel("连接中...");
}
 
开发者ID:funnyzhaov,项目名称:Tribe,代码行数:12,代码来源:MineFragment.java

示例6: showProgress

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
public static void showProgress(Context context){
    if (mProgress == null) {
        mProgress = KProgressHUD.create(context)
                .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                .setCancellable(true)
                .setAnimationSpeed(2)
                .setDimAmount(0.5f)
                .show();
    } else {
        mProgress.show();
    }
}
 
开发者ID:funnyzhaov,项目名称:Tribe,代码行数:13,代码来源:ProgressHelp.java

示例7: show

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
/**
 * 显示加载HUD 需要手动取消
 *
 * @param context 上下文
 * @return KProgressHUD
 */
public static KProgressHUD show(Context context) {
    return KProgressHUD.create(context)
            .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
            .setCancellable(true)
            .setDimAmount(0.5f)
            .show();
}
 
开发者ID:6ag,项目名称:LiuAGeAndroid,代码行数:14,代码来源:ProgressHUD.java

示例8: showWaitDialog

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
@Override
public KProgressHUD showWaitDialog(String message, boolean canBack) {
    if (mWait == null)
        mWait = KProgressHUD.create(mContext)
                .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                .setLabel("请稍等")
                .setAnimationSpeed(2)
                .setDimAmount(0.5f);
    else if (mWait.isShowing()) mWait.dismiss();
    mWait.setCancellable(canBack)
            .setDetailsLabel(message)
            .show();
    return mWait;
}
 
开发者ID:qinci,项目名称:MarkdownEditors,代码行数:15,代码来源:BaseActivity.java

示例9: initHUD

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
private void initHUD() {
    mHud = KProgressHUD.create(this)
            .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
            .setLabel("正在登陆...")
            .setDimAmount(0.5f);
}
 
开发者ID:coderwjq,项目名称:ZhaZhaShop,代码行数:7,代码来源:LoginActivity.java

示例10: onClick

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
@Override
public void onClick(View v) {
    switch (v.getId()) {
        case R.id.indeterminate:
            hud = KProgressHUD.create(this)
                    .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE);
            scheduleDismiss();
            break;
        case R.id.label_indeterminate:
            hud = KProgressHUD.create(this)
                    .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                    .setLabel("Please wait")
                    .setCancellable(true);
            scheduleDismiss();
            break;
        case R.id.detail_indeterminate:
            hud = KProgressHUD.create(this)
                    .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                    .setLabel("Please wait")
                    .setDetailsLabel("Downloading data");
            scheduleDismiss();
            break;
        case R.id.determinate:
            hud = KProgressHUD.create(MainActivity.this)
                    .setStyle(KProgressHUD.Style.PIE_DETERMINATE)
                    .setLabel("Please wait");
            simulateProgressUpdate();
            break;
        case R.id.annular_determinate:
            hud = KProgressHUD.create(MainActivity.this)
                    .setStyle(KProgressHUD.Style.ANNULAR_DETERMINATE)
                    .setLabel("Please wait");
            simulateProgressUpdate();
            break;
        case R.id.bar_determinate:
            hud = KProgressHUD.create(MainActivity.this)
                    .setStyle(KProgressHUD.Style.BAR_DETERMINATE)
                    .setLabel("Please wait");
            simulateProgressUpdate();
            break;
        case R.id.custom_view:
            ImageView imageView = new ImageView(this);
            imageView.setImageResource(R.mipmap.ic_launcher);
            hud = KProgressHUD.create(this)
                    .setCustomView(imageView)
                    .setLabel("This is a custom view");
            scheduleDismiss();
            break;
        case R.id.dim_background:
            hud = KProgressHUD.create(this)
                    .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                    .setDimAmount(0.5f);
            scheduleDismiss();
            break;
        case R.id.custom_color_animate:
            //noinspection deprecation
            hud = KProgressHUD.create(this)
                    .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
                    .setWindowColor(getResources().getColor(R.color.colorPrimary))
                    .setAnimationSpeed(2);
            scheduleDismiss();
            break;
    }

    hud.show();
}
 
开发者ID:liangchengcheng,项目名称:android-loading-dialog,代码行数:67,代码来源:MainActivity.java

示例11: showWaitDialog

import com.kaopiz.kprogresshud.KProgressHUD; //导入依赖的package包/类
/**
 * 显示等待的对话框
 *
 * @param text
 * @return
 */
KProgressHUD showWaitDialog(String text, boolean canBack);
 
开发者ID:qinci,项目名称:MarkdownEditors,代码行数:8,代码来源:WaitDialogInterface.java


注:本文中的com.kaopiz.kprogresshud.KProgressHUD类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。