android学习随记
zsm1218179594
像个孩子,多点微笑
展开
-
android学习随记-头像拍照及选择图库
/** * 调用本地图片库 */public static Intent invokeGallery() { Intent intent = new Intent(Intent.ACTION_PICK, null); intent.setDataAndType( MediaStore.Images.Media.EXTERNAL_CONTENT_URI,原创 2016-09-14 16:17:55 · 221 阅读 · 0 评论 -
EditText限制小数点前后位数
在EditText输入数字的时候,通常我们需要限制小数点前后位数.比如金额输入一般我们需要限制小数点后面最多2位.我们可以通过 TextWatcher 实现.public class MyWatcher implements TextWatcher { private int beforeDot; private int afterDot; /**转载 2016-10-31 11:41:38 · 213 阅读 · 0 评论