android_Toast连点/360浮动窗口/自定义ProgressBar

 

 

 

设置Toast变量,判断是否存在. 

 private static Toast mToast;
 public static void show(Context ctx, String text) {
  if (mToast == null) {
   mToast = Toast.makeText(ctx, text, Toast.LENGTH_SHORT);
  } else {
   mToast.setText(text);
  }
  mToast.show();
 }

 

 

 

对type/flag的值设定.

  WindowManager mWM;  // WindowManager
  WindowManager.LayoutParams mWMParams; // WindowManager参数
  wmParams.type = 2003; // type是关键,这里的2002表示系统级窗口,你也可以试试2003。
  wmParams.flags = 40;// 这句设置桌面可控
  mWM.addView(win,wmParams);// 这句是重点 给WindowManager中丢入刚才设置的值只有addview后才能显示到页面上去。
      // 注册到WindowManager win是要刚才随便载入的layout,wmParams是刚才设置的WindowManager参数集效果是将win注册到WindowManager中并且它的参数是wmParams中设置.

 

 

 

 

  ProgressBar --> View:利用帧动画可实现不停的旋转;android:indeterminateDrawable="@anim/progress_bar_anim";也可以继承ProgressBar,利用RotateAnimation实现旋转;
  The application can change the amount of progress (modifying the length of the bar) as it moves forward.
  The indeterminate progress bar can be either a spinning wheel or a horizontal bar.
  SeekBar --> AbsSeekBar --> ProgressBar --> View:A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch the thumb and drag left or right to set the current progress level or use the arrow keys.

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值