implement android.graphics.Matrix and View.getMatrix()

This is needed for androidx CoordinatorLayout and will also be required
for VectorDrawables
This commit is contained in:
Julian Winkler
2024-03-13 22:51:34 +01:00
parent f852c2bbc9
commit 796742c0fc
10 changed files with 369 additions and 180 deletions

View File

@@ -1374,7 +1374,13 @@ public class View extends Object {
public boolean onGenericMotionEvent(MotionEvent event) {return false;}
protected boolean awakenScrollBars() {return false;}
public Matrix getMatrix() {return new Matrix();}
protected native boolean native_getMatrix(long widget, long matrix);
public Matrix getMatrix() {
Matrix matrix = new Matrix();
native_getMatrix(widget, matrix.native_instance);
return matrix;
}
protected static final int[] EMPTY_STATE_SET = new int[0];