06 2018 档案

摘要:override fun onCreateOptionsMenu(menu: Menu?): Boolean { menu?.add(Menu.NONE, 0, 0, "重新导入") return true } override fun onOptionsItemSelected(item: MenuItem?): Boolean { ... 阅读全文
posted @ 2018-06-26 11:23 H_bolin 阅读(198) 评论(0) 推荐(0)
摘要:// 调整屏幕亮度 --> 把亮度调到最高 WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes(); lp.screenBrightness = 255f * (1f / 255f); getActivity().getWindow().setAttribu... 阅读全文
posted @ 2018-06-26 10:45 H_bolin 阅读(337) 评论(0) 推荐(0)
摘要:教你步步为营掌握自定义View 阅读全文
posted @ 2018-06-25 13:42 H_bolin 阅读(129) 评论(0) 推荐(0)
摘要:/** * 解析xml的工具类 * 1、将多层级xml解析为Map */ public class ParseXmlUtil { public static final String TAG = "ParseXmlUtil"; /** * 将xml格式响应报文解析为Map格式 * * @param responseXmlTemp *... 阅读全文
posted @ 2018-06-19 10:10 H_bolin 阅读(2132) 评论(0) 推荐(0)
摘要:V7包中的Theme.AppCompat主题系列中并没有全屏样式,这个是为什么,只有作者知道…… 解决办法: 自定义主题 https://blog.csdn.net/jhone_csdn/article/details/51240287 阅读全文
posted @ 2018-06-04 11:28 H_bolin 阅读(664) 评论(0) 推荐(0)
摘要:editText.setInputType(InputType.TYPE_CLASS_NUMBER); String digits = "0123456789."; editText.setKeyListener(DigitsKeyListener.getInstance(digits)); set 阅读全文
posted @ 2018-06-04 09:13 H_bolin 阅读(2162) 评论(0) 推荐(0)
摘要:直接上实例: 代码运行得完全没有问题,输出结果: But,很明显,我们的数据并没有保存到数据库中,但返回给了其他服务OK的结果,这个是要出大问题的。 正确的做法是直接抛出异常。因为数据库没有保存到数据库中,原因是null异常 所以,一定不要为了保证代码运行得没有问题,而滥用 ? 。这样的做法是错误的 阅读全文
posted @ 2018-06-01 14:55 H_bolin 阅读(1018) 评论(0) 推荐(0)