Android:在图像视图中按角度旋转图像
ImageView iv = (ImageView)findViewById(imageviewid);TextView tv = (TextView)findViewById(txtViewsid);Matrix mat = new Matrix();Bitmap bMap = BitmapFactory.decodeResource(getResources(),imageid);mat.postRotate(Integer.parseInt(degree));===>angle to be rotatedBitmap bMapRotate = Bitmap.createBitmap(bMap, 0, 0,bMap.getWidth(),bMap.getHeight(), mat, true);iv.setImageBitmap(bMapRotate);
呼啦一阵风
红糖糍粑
慕虎7371278
相关分类