一度に一部だけを表示したい ImageView があります。ただし、同じ x、y 座標から開始します。これを行う簡単な方法はありますか?
1377 次
2 に答える
0
check out this
Drawable drawable = getResources().getDrawable(R.drawable.image);
Bitmap bitmap = ((BitmapDrawable) drawable ).getBitmap();
bitmap= Bitmap.createBitmap(bitmap , startX, startY, width, height);
imgview.setBackgroundDrawable(new BitmapDrawable(bitmap));
you can also resise your image
Bitmap resizedImage = Bitmap.createScaledBitmap(bitmap, scrwidth, scrwidth, false);
于 2012-04-04T14:41:39.000 に答える