Privateimageview IV; iv= (ImageView) Findviewbyid (R.id.imageview); // Initialize images that appear when loading Bitmap loadingbitmap = Bitmapfactory.decoderesource (Getresources (), R.DRAWABLE.SNAPSHOTMG);/* R.DRAWABLE.SNAPSHOTMG for tacit display of images * * // Initialize the image to load the failed display Bitmap failbitmap = Bitmapfactory.decoderesource (Getresources (), R.DRAWABLE.SNAPSHOTMG); /// The first method: Image is the control to show the image Bitmap.display (iv, URI); /// second method:loadingbitmap is the image that appears when loading //bitmap.display (iv, Uri, LOADINGBITMAP); /// Third method:loadingbitmap for loading the image,failbitmap for loading the losing image //Bitmap.display (iv, URI, Loadingbitmap, failbitmap); // Fourth method: We can also set the size of the loaded image //bitmap.display (iv, URI, +, +); /// Fifth method: Set the size of the loaded image and the load and load the lost image //bitmap.display (iv, URI, +, +, Loadingbitmap, failbitmap); |