interface layout, linear layout, vertical arrangement, two x ImageView
Get to two ImageView Objects
Call the Bitmapfactory.decoderesource (res,id) method to get the Bitmap Object
Parameters:res is getresource (),ID is resource ID such as: r.drawable.xxx
Call the ImageView object's setimageviewbitmap (), parameter:Bitmap Object
Get an editable Bitmap Object
Call the createbitmap (width,height,config) method of the Bitmap object to get an editable Bitmap Object
Parameters: Wide Height configuration, these are the original width height,Bitmap object getwidth (),getheight (), GetConfig ()
Get the canvas object, via new canvas (bitmap), Parameters:bitmap Object
Call the drawbitmap (bitmap,matrix,paint) method of the Canvas object,
Parameters:Bitmap object template, matrix is a fabric,paint is a brush
Get the Paint object, come out with new
Call the SetColor () method of the paint object , set the brush color, parameters:color.black
Get the Matrix object and come out with new
Call the setValue (value) method of the Matrix object to set the matrix value
Parameter:value is float[] Array,(0.5f,0,0,0,1,0,0,0,1)
This matrix is not clear to most people, so there is another API
Call the Matrix object's setscale (sx,sy), set the scale, parameter: Half is 0.5f 0.5f
Call the Setimagebitmap () method of the second ImageView object to show
[Android] Image zoom