afinal inside Finalbitmap: Used to display bitmap pictures without regard to issues such as thread concurrency and oom.
1. Test request
Use the Web page to open http://avatar.csdn.net/C/6/8/1_bz419927089.jpg "to see a picture.
2. New Finalbitmap Object
Finalbitmap bitmap = Finalbitmap.create (this);
3. Set the URI address of the picture
String uri = "Http://avatar.csdn.net/C/6/8/1_bz419927089.jpg";
4. Loading pictures
Private ImageView IV;
iv= (ImageView) Findviewbyid (R.id.imageview);
The picture that is displayed when the load is initialized
Bitmap Loadingbitmap = Bitmapfactory.decoderesource (Getresources (), R.DRAWABLE.SNAPSHOTMG);/* R.DRAWABLE.SNAPSHOTMG display the picture by default */
Initialize load failed to display picture
Bitmap Failbitmap = Bitmapfactory.decoderesource (Getresources (), R.DRAWABLE.SNAPSHOTMG);
The first way: image is the control for which you want to display a picture
Bitmap.display (iv, URI);
Second way: Loadingbitmap is the picture that is displayed when loading
Bitmap.display (iv, Uri, LOADINGBITMAP);
The third Way: Loadingbitmap for loading pictures, Failbitmap for loading failed pictures
Bitmap.display (iv, URI, Loadingbitmap, Failbitmap);
Fourth Way: We can also set the size of the loaded picture
Bitmap.display (iv, URI, 100, 100);
Fifth way: Set the size of the loaded picture and the picture that failed to load and load
Bitmap.display (iv, URI, +, +, Loadingbitmap, failbitmap);
Android---afianl frame inside the finalbitmap load network picture