03 2015 档案
摘要:在Android的PorterDuff.Mode类中列举了他们制定的规则:android.graphics.PorterDuff.Mode.SRC:只绘制源图像android.graphics.PorterDuff.Mode.DST:只绘制目标图像android.graphics.PorterDuf...
阅读全文
摘要:一、通过Intent调用系统录像程序final int CODE_VIDEO_SYS = 0x001 ;Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);startActivityForResult(intent, CODE_VI...
阅读全文
摘要:注意,Camera API在API>=21已经被废弃了,建议使用android.hardware.camera2 API来进行操作。调用Camera API拍照的流程如下:To take pictures with this class, use the following steps:Obtain...
阅读全文
摘要:1、说明,调用系统拍照是需要在有摄像头的设备上才能使用的功能,因此需要声明,可见android在最开始的时候还计划了没有带摄像头的设备。 可以使用PackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA)检测android设备是...
阅读全文
摘要:项目中使用了SwipeBackLayout,要求Activity主题添加"android:windowIsTranslucent"才能达到Acitivity透明效果。偶然发现使用此属性之后Acitivity的生命周期有影响,Activity A启动之后,启动Activity B,Activity A...
阅读全文
摘要:之前在xml中布局,运行之后发现图片被拉伸了,只需要在代码中设置pBar.setIndeterminateDrawable(Drawable drawable)即可。
阅读全文

浙公网安备 33010602011771号