Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Does anyone know how to achieve the overall scaling of the android interface?
Does anyone know how to achieve the overall scaling of the android interface?
Android interface to achieve overall scaling

Code:

float basevectorX = 0.0f

float basevectorY = 0.0f

//floating-point coordinate upper-left corner coordinate

float FfrogX = 0.0f

float f logic = 0.0f;

//Upper left corner coordinates of plastic coordinates

int frogX = 0;

int frogY = 0;

Rect Rect = new Rect();

ffr ogx = ffr ogx+base vectorx;

frogX =(int)ff rogx;

f logic = f logic+base vectory;

frogY =(int)f frogY;

rect.left = frogX

rect . right = screen Width-rect . left-Width; //640

rect.top = frogY//480

rect . bottom = screen Height-rect . top-Height; //480

((MarginLayoutParams)frog view . getlayoutparams())。 setMargins(rect.left,rect.top,rect.right,rect . bottom);

//This can be zoomed in and out and moved.

centex = rect . left+Width/2; //The x coordinate of the center point is used for judgment and 2d.

CenterY = rect . top+Height/2; //Use the Y coordinate of the center point for judgment. It is used in 2d.