Код: Выделить всё
public Object getItem(int position) {
int top, bot, left, right;
top = rgnH * position; // line 1
bot = top + rgnH - (position == getCount() - 1 ? 4 : 0); // line 2
left = rgnNbr * rgnW + (rgnNbr != 0 ? BORDER : 0); // line 3
right = (rgnNbr + 1) * rgnW + (rgnNbr == 0 || rgnNbr == maxRgn ? BORDER : 0); // line 4
rect = new Rect(left, top, right, bot);
Bitmap bitmap = bitmapDecoder.decodeRegion(rect, op);
if (inBitmap == null) {
inBitmap = bitmap;
op.inBitmap = inBitmap;
}
return Bitmap.createScaledBitmap(bitmap, finalW, finalH, true);
}
Подробнее здесь: https://stackoverflow.com/questions/356 ... es-of-code