I have created an image with the resolution of 25px(width)*34px(height) (I know it's unusual, however it doesn't bother me now). The problem is that when I try to display it by creating a bitmap, it becomes really really small on my Galaxy S4. It should look a little pixelated, kinda like a flappy bird sprite. I checked those sprites as well and they are even smaller in comparison to mine however it is displayed much bigger than my sprite on the screen. I want to know if I can make it look larger without scaling it. Is there a way to make my sprite look bigger?
@Override
protected void onDraw(Canvas canvas) {
Log.i(TAG, "onDraw called");
BitmapFactory.Options op = new BitmapFactory.Options();
op.inPreferredConfig = Bitmap.Config.ALPHA_8;
bm.setDensity(DisplayMetrics.DENSITY_DEFAULT);
bm = Bitmap.createBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.giraffe_default,op));
canvas.drawBitmap(bm,getWidth()/2,getHeight()/2,null); //get from res, set coords to 10,10
}
This is my onDraw method where I draw my canvas and bitmap. As I said, my image appears to be so small, I can barely see it.