feat:fix Android rotation npe
This commit is contained in:
parent
cefe087b3f
commit
c1b5b917b3
@ -34,6 +34,7 @@ public class AsyncCall {
|
||||
try {
|
||||
asyncResult.setResult(callable.call());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
asyncResult.setError(e);
|
||||
}
|
||||
} else {
|
||||
@ -43,6 +44,7 @@ public class AsyncCall {
|
||||
try {
|
||||
asyncResult.setResult(callable.call());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
asyncResult.setError(e);
|
||||
}
|
||||
}
|
||||
|
@ -270,12 +270,12 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
|
||||
@DoricMethod
|
||||
public int getWidth() {
|
||||
return mView.getWidth();
|
||||
return getNodeView().getWidth();
|
||||
}
|
||||
|
||||
@DoricMethod
|
||||
public int getHeight() {
|
||||
return mView.getHeight();
|
||||
return getNodeView().getHeight();
|
||||
}
|
||||
|
||||
@DoricMethod
|
||||
@ -287,11 +287,11 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
while (rotation < -1) {
|
||||
rotation = rotation + 1;
|
||||
}
|
||||
doricLayer.setRotation(rotation * 360);
|
||||
getNodeView().setRotation(rotation * 360);
|
||||
}
|
||||
|
||||
@DoricMethod
|
||||
public float getRotation() {
|
||||
return doricLayer.getRotation() / 360;
|
||||
return getNodeView().getRotation() / 360;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user