I now want to display a relatively large bmp images directly imageview not show, then I try to use bitmap display it, display the picture is too small. I would like to ask how to let him fill the imageview area. There is how to set the center of the picture display.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The relevant code:
File file = new File (Environment.getExternalStorageDirectory ()
. ToString ()
+ File.separator
+ "Mldndata"
+ File.separator
+ "SAT_2011111TO115_3B_CHL.BMP");
try {
InputStream is = new FileInputStream (file);
bmp1 = BitmapFactory.decodeStream (is);
} Catch (Exception e) {
/ / TODO: handle exception
}
chlmapImageView.setImageBitmap (bmp1);
No comments:
Post a Comment