您的位置:首页 > 其它

文章标题

2016-07-28 14:02 190 查看
将一个图片中间分开,向两边退出

先创建画布



void getLeftBitmap(Bitmap srcBitmap){

Bitmap destBitmap = Bitmap.createBitmap(srcBitmap.getwidth()/2, srcBitmap.getheight(),srcBItmap.getConfig());

//创建画布
Canvas canvas = new Canvas(destBitmap);

//创建画笔


Matrix matrix = newe Matrix();

Paint paint = new Paint();

canvas.drawBitmap(srcBitmap, matrix,paint)}

android.view.WindowManager$BadTokenException: Unable to add window – token null is not for an application

,使用dialog上下文只能传this,不然会报这个错。

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: