• 每日汇报


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

    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;
  • 相关阅读:
    html5+css3中的background: -moz-linear-gradient 用法 (转载)
    CentOS 安装Apache服务
    Linux 笔记
    CURL 笔记
    Spring Application Context文件没有提示功能解决方法
    LeetCode 389. Find the Difference
    LeetCode 104. Maximum Depth of Binary Tree
    LeetCode 520. Detect Capital
    LeetCode 448. Find All Numbers Disappeared in an Array
    LeetCode 136. Single Number
  • 原文地址:https://www.cnblogs.com/D10304/p/14909264.html
Copyright © 2020-2023  润新知