摘要:
ImageView的Scaletype决定了图片在View上显示时的样子,如进行何种比例的缩放,及显示图片的整体还是部分,等等。1. SetScaleType(ImageView.ScaleType.CENTER); 按图片的原来size居中显示,当图片长/宽超过View的长/宽,则截取图片的居中部分显示2. SetScaleType(ImageView.ScaleType.CENTER_CROP); 按比例扩大图片的size居中显示,使得图片长(宽)等于或大于View的长(宽)3. setScaleType(ImageView.ScaleType.CENTER_INSIDE); 将图片的内容 阅读全文
摘要:
notification通知配合使用LED灯,附带震动notification.ledARGB = Color.BLUE;notification.ledOffMS = 100;notification.ledOnMS = 100;notification.flags |= Notification.FLAG_SHOW_LIGHTS;notification.flags |= Notification.FLAG_AUTO_CANCEL;// 点击取消Vibrator vibrator = (Vibrator) context.getSystemService(Service.VIBRATOR_ 阅读全文
摘要:
//设置无标题 requestWindowFeature(Window.FEATURE_NO_TITLE); //设置全屏getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); 阅读全文