android 常用代码

让一个图片透明:

Bitmap buffer = Bitmap.createBitmap(width, border="1" Height, Bitmap.Config.ARGB_4444);buffer.eraseColor(Color.TRANSPARENT);


程序控制屏幕变亮:
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 100 / 100 .0f;
getWindow().setAttributes(lp);


过滤特定文本
Filter filter = myAdapter.getFilter();
filter.filter(mySearchText);

你可能感兴趣的:(java,android)