On HTC G12 mobile phone, a 400 * 300 picture to get to the width and height of 400 * 300; is normal.
Then run on an android PAD tablet, gets to the width of the height of 333 * 250; There seems to get to the actual size is about 0.83. .
What are the causes. . Machine with a screen resolution of relationship you have,
What version can analyze the cause and solve the problem. .
/ * Load image * /
Bitmap image = BitmapFactory.decodeResource (this.getResources (), R.drawable.qq);
BACKWIDTH = image.getWidth ();
BACKHEIGHT = image.getHeight ();<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Estimate your pad is 1.5 firmware
Reply:
Agree upstairs, your pad of andoird should be 1.5
Reply:
May I ask how to see the firmware version. . So how do you solve this problem
Reply:
Android 2.2 system my PAD it. . . How it happened
Reply:
Help ah
Reply:
DisplayMetrics dm = new DisplayMetrics ();
getWindowManager () getDefaultDisplay () getMetrics (dm);..
float percent = dm.density;
Look at this value is equal to the number. .
Reply:
Bitmap image = BitmapFactory.decodeResource (this.getResources (), R.drawable.qq);
image = BitMap.createScaledBitmap (image, "width", "high", false);
LZ so on ok
Reply:
Bitmap image = BitmapFactory.decodeResource (this.getResources (), R.drawable.qq);
image = BitMap.createScaledBitmap (image, "width", "high", false);
LZ so on ok
No comments:
Post a Comment