[英]How to make view size the same on every device on Android studio
Im making a collaborative drawing app but I can't get painting view/ canvas to be the same size on each device.我正在制作一个协作绘图应用程序,但我无法在每个设备上获得相同大小的绘画视图/画布。 How can I fix this?我怎样才能解决这个问题? here are screenshots of the app on 2 different android phones App screenshots这是该应用程序在 2 款不同的 Android 手机上的屏幕截图 应用程序屏幕截图
你可以试试这个代码
canvasid.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.