手机背景图片 安卓程序开发中,如何让背景图片适应屏幕大小的改变。用Matrix具体实现的过程是什么?
安卓程序开发中,如何让背景图片适应屏幕大小的改变。用Matrix具体实现的过程是什么?通过public int screenwidth;public int screenheight;WindowMa
安卓程序开发中,如何让背景图片适应屏幕大小的改变。用Matrix具体实现的过程是什么?
通过public int screenwidth;public int screenheight;WindowManager WindowManager=getwindowmanager()display=windowManager.getDefaultDisplay()屏幕宽度=显示.getWidth()屏幕高度=显示.getHeight()得到屏幕的宽度和高度,然后用矩阵法中的比例函数来传递两个值作为参数,然后可以使图像适应屏幕大小