/**
     * 弹出loading动画
     */
    public static void showLoading(Activity activity) {
        View popView = activity.getLayoutInflater().inflate(R.layout.pop_loading_layout, null, false);
        //运行动画
        ((AnimationDrawable) (popView.findViewById(R.id.carAnim)).getBackground()).start();

        loading = new PopupWindow(popView,
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT);
        loading.setTouchable(true);
        loading.setOutsideTouchable(false);
        loading.setBackgroundDrawable(null);
     //获取Activity的内容页        
     loading.showAtLocation(activity.getWindow().getDecorView().findViewById(android.R.id.content), Gravity.START | Gravity.TOP, 0, 0); loading.update(); }

  

相关文章:

  • 2021-07-21
  • 2021-10-07
  • 2021-11-29
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
猜你喜欢
  • 2021-10-06
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
相关资源
相似解决方案