zoukankan      html  css  js  c++  java
  • 每日汇报

    今天写了一些后台的配置,完善了登录验证的问题

    public static Dialog showWaitDialog(Context context, String msg, boolean isTransBg, boolean isCancelable) {
    LayoutInflater inflater = LayoutInflater.from(context);
    View v = inflater.inflate(R.layout.login_dialog_loading, null); // 得到加载view
    RelativeLayout layout = (RelativeLayout) v.findViewById(R.id.dialog_view);// 加载布局

    // main.xml中的ImageView
    ImageView spaceshipImage = (ImageView) v.findViewById(R.id.img);
    TextView tipTextView = (TextView) v.findViewById(R.id.tipTextView); // 提示文字
    // 加载动画
    Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(context, R.anim.rotate_animation);
    // 使用ImageView显示动画
    spaceshipImage.startAnimation(hyperspaceJumpAnimation);
    tipTextView.setText(msg);// 设置加载信息

    Dialog loadingDialog = new Dialog(context, isTransBg ? R.style.TransDialogStyle : R.style.WhiteDialogStyle); // 创建自定义样式dialog
    loadingDialog.setContentView(layout);
    loadingDialog.setCancelable(isCancelable);
    loadingDialog.setCanceledOnTouchOutside(false);

    Window window = loadingDialog.getWindow();
    WindowManager.LayoutParams lp = window.getAttributes();
    lp.width = WindowManager.LayoutParams.MATCH_PARENT;
    lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
    window.setGravity(Gravity.CENTER);
    window.setAttributes(lp);
    window.setWindowAnimations(R.style.PopWindowAnimStyle);
    loadingDialog.show();
    return loadingDialog;
  • 相关阅读:
    python3之面向对象实例存家具
    python3之面向对象实例烤地瓜
    python3之批量修改文件名称
    python3处理大文件
    利用函数的递归计算数字的阶乘
    windows10安装.netframework3.5
    centos7-django(python3)环境搭建
    centos7-django(python3)环境搭建!
    Java线程池
    python设置编码
  • 原文地址:https://www.cnblogs.com/D10304/p/14909264.html
Copyright © 2011-2022 走看看