Merge change 8839
* changes: Fix selection and change icon loading from 565 to 8888.
This commit is contained in:
@@ -187,16 +187,16 @@ public class RolloRS {
|
||||
|
||||
|
||||
b = BitmapFactory.decodeResource(mRes, R.raw.browser, opts);
|
||||
mIcons[0] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGB_565, true);
|
||||
mIcons[0] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGBA_8888, true);
|
||||
|
||||
b = BitmapFactory.decodeResource(mRes, R.raw.market, opts);
|
||||
mIcons[1] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGB_565, true);
|
||||
mIcons[1] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGBA_8888, true);
|
||||
|
||||
b = BitmapFactory.decodeResource(mRes, R.raw.photos, opts);
|
||||
mIcons[2] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGB_565, true);
|
||||
mIcons[2] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGBA_8888, true);
|
||||
|
||||
b = BitmapFactory.decodeResource(mRes, R.raw.settings, opts);
|
||||
mIcons[3] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGB_565, true);
|
||||
mIcons[3] = mRS.allocationCreateFromBitmap(b, RenderScript.ElementPredefined.RGBA_8888, true);
|
||||
|
||||
/*
|
||||
b = BitmapFactory.decodeResource(mRes, R.raw.assasins_creed, opts);
|
||||
@@ -342,8 +342,8 @@ public class RolloRS {
|
||||
}
|
||||
|
||||
private void makeTextBitmap() {
|
||||
//Bitmap.createBitmap(width, height, Bitmap.Config);
|
||||
//new Canvas(theBitmap);
|
||||
//Bitmap b = Bitmap.createBitmap(128, 64, Bitmap.Config);
|
||||
//Canvas c = new Canvas(b);
|
||||
//canvas.drawText();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,11 +101,11 @@ public class RolloView extends RSSurfaceView {
|
||||
|
||||
void computeSelection(float x, float y)
|
||||
{
|
||||
float col = mColumn + (x - 0.5f) * 4 + 1;
|
||||
float col = mColumn + (x - 0.5f) * 4 + 1.25f;
|
||||
int iCol = (int)(col + 0.25f);
|
||||
|
||||
float row = (y / 0.8f) * mRows;
|
||||
int iRow = (int)(row - 0.25f);
|
||||
int iRow = (int)(row - 0.5f);
|
||||
|
||||
mRender.setSelected(iCol * mRows + iRow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user