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