05 2017 档案

摘要:Rect bounds = new Rect(); String text = "Hello World"; TextPaint paint; paint = findViewById(R.id.hello_world).getPaint(); paint.getTextBounds(text, 0 阅读全文
posted @ 2017-05-26 17:59 lucktian 阅读(3887) 评论(0) 推荐(0)
摘要:思路:由于item里需要处理多种点击事件,所以不便于用listview的onItemClickListener, 需要在adapter里进行设置不同点击区域的onclicklistener 但是,有时候有些业务逻辑并不是在adapter里处理,所以需要在activity或者 fragment里提供给 阅读全文
posted @ 2017-05-25 14:24 lucktian 阅读(1465) 评论(0) 推荐(0)
摘要:WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);Display display = windowManager.getDefaultDisplay();and 阅读全文
posted @ 2017-05-24 18:58 lucktian 阅读(6107) 评论(0) 推荐(0)