feat: do not trust canvas's width and height

This commit is contained in:
cgspine
2022-02-21 15:53:59 +08:00
parent 3f2fc5c0cb
commit eadf882b99
@@ -45,7 +45,7 @@ import androidx.core.content.ContextCompat;
* @date 2017-03-10
*/
public class QMUILayoutHelper implements IQMUILayout {
public class QMUILayoutHelper implements IQMUILayout {
public static final int RADIUS_OF_HALF_VIEW_HEIGHT = -1;
public static final int RADIUS_OF_HALF_VIEW_WIDTH = -2;
private Context mContext;
@@ -781,7 +781,7 @@ public class QMUILayoutHelper implements IQMUILayout {
return;
}
int width = canvas.getWidth(), height = canvas.getHeight();
int width = owner.getWidth(), height = owner.getHeight();
canvas.save();
canvas.translate(owner.getScrollX(), owner.getScrollY());