随笔分类 -  Android

摘要:参考:http://stackoverflow.com/questions/4237469/why-do-variable-names-often-start-with-the-letter-m 16down vote According to Google documentation: Non-p 阅读全文
posted @ 2016-08-20 15:35 MakeBetter 阅读(346) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/12018997/why-does-getview-return-wrong-convertview-objects-on-separatedlistadapter#comment35496677_12288051 The rec 阅读全文
posted @ 2016-08-01 16:58 MakeBetter 阅读(357) 评论(0) 推荐(0)
摘要:需求:准确控制Text的高度,pressed时候,同时改变背景和text的样式。 用Button的话,不能准确控制text的高度。 用Image+TextView叠加的话,pressed时候,onClick事件会被两者中一个consume,因此text的样式,背景只能改变其中之一,代码中设置也很不方 阅读全文
posted @ 2016-07-29 16:21 MakeBetter 阅读(537) 评论(0) 推荐(0)
摘要:1.设置TextView的textColor为color资源中的某个颜色。 2. 必须设置TextView的OnClickListener,可设置为null即可 3. 参考:http://www.tuicool.com/articles/ERVJJ3R 阅读全文
posted @ 2016-07-29 16:01 MakeBetter 阅读(453) 评论(0) 推荐(0)
摘要:1. 下载驱动,并重启电脑 http://www.technobuzz.net/install-lg-g3-lg-drivers-windows-mac-usb-adb/ 2. 保证打开开发者模式,并设置USB的模式为MTP模式 MAC系统:10.11.4 阅读全文
posted @ 2016-04-21 11:55 MakeBetter 阅读(358) 评论(0) 推荐(0)
摘要:参考博客:http://www.cnblogs.com/xiaoQLu/p/3324503.html 阅读全文
posted @ 2016-04-16 15:53 MakeBetter 阅读(202) 评论(0) 推荐(0)
摘要:hdpi:其图标大小为 72 x 72 px。 xhdpi:其图标大小为 96 x 96 px。 xxhdpi:其图标大小为 144 x 144 px。 xxxhdpi :其图标大小为 192 x 192 px。 Google Play:要求为512 x 512px。 阅读全文
posted @ 2016-04-16 14:57 MakeBetter 阅读(1548) 评论(0) 推荐(0)
摘要:文章链接:https://developer.chrome.com/devtools/docs/remote-debugging#install-adbplugin 遇到问题: 1. 尝试重启手机/pad 2. 重新开关手机/pad的开发者模式 3. 打不开Chrome的:chrome://insp 阅读全文
posted @ 2016-03-23 14:33 MakeBetter 阅读(423) 评论(0) 推荐(0)
摘要:self.navigationController.interactivePopGestureRecognizer.enabled = NO;//禁止手势滑动 阅读全文
posted @ 2016-03-15 17:21 MakeBetter 阅读(757) 评论(0) 推荐(0)
摘要:final EditText inputServer = new EditText(this); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Server").setIcon(android.R.drawable.ic_dialog_i... 阅读全文
posted @ 2016-03-15 14:35 MakeBetter 阅读(2185) 评论(0) 推荐(0)
摘要:使用场景:设置高斯模糊处理过的Screen Shot为顶层View的背景。 因此: 1. onCreate时候,hide顶层view(蓝牙搜索View),显示下一层View,然后获取Screen Shot,设置为蓝牙搜索View的背景。 2. 从后台切换,再次进入App的时候,则什么都不做 阅读全文
posted @ 2016-03-14 11:08 MakeBetter 阅读(426) 评论(0) 推荐(0)
摘要:主要思路:根据FontMetrica计算Text的高度,根据Rect计算Text的宽度。两者与字体,字号有关系 参考文章: http://blog.csdn.net/hursing/article/details/18703599 http://blog.csdn.net/sirnuo/articl 阅读全文
posted @ 2016-02-28 11:24 MakeBetter 阅读(5992) 评论(0) 推荐(0)
摘要:private void addViewByCode(){ View subView = new View(context); subView.setBackgroundColor(Color.RED); //subView的宽高 int subViewwidth = 700; int subVie 阅读全文
posted @ 2016-02-28 11:17 MakeBetter 阅读(498) 评论(0) 推荐(0)