1.Toast的基本使用 Toast在Android中属于系统消息通知,用来提示用户完成了什么操作.或者给用户一个必要的提醒.Toast的官方定义是这样的: A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible a
popupwindow偶尔的显示失效(在低版本Android系统的手机上,测试机6.0)实在是坑害了不少人,害,而且坑了for a long time.本小白就是其中一个受害者. 百度了N久N多还是没有搜索到适合我的,说是只要在showAsDown之前设置popupwindow的宽高就好了,but,对于我来说莫得用,我布局设置了固定大小都不行. 所以我开始看各个参数,注意到了在我自定义popupwindow的builder下的: .showAsDropDown(mLinMain, 0, 0);
前几天做项目中选择图片的过程中遇到高版本和小米手机出现无法选择和崩溃的问题,现在记录下来,后面出现同类问题,也好查找 1,定义常量: private static final int TAKE_PICTURE = 3; private static final int CHOOSE_PICTURE = 4; private static final int CROP_SMALL_PICTURE = 5; 2,拍照,选择相册图片逻辑,下面红色部分就是兼容高版本和低版本选取相册图片的代码,不会出现问
转载自:解决小米手机不能运行Android Studio程序的问题 问题描述 Android Studio升级到2.3版本之后,小米手机MIUI8不能运行Android Studio程序,报如下错误: Installation failed with message Failed to establish session. It is possible that this issue is resolved by uninstalling an existing version of apk i
小米手机不能直接运行Android Studio程序 转载自:http://www.jianshu.com/p/6588c69b42cf Problem description: Android Studio升级到2.3版本之后,小米手机MIUI不能直接点击Run运行Android Studio程序,报如下错误: Installation failed with message Failed to establish session.It is possible that this issue