api-impl: misc stubs and fixes

This commit is contained in:
Mis012
2025-03-26 21:01:57 +01:00
parent fd2e9f43b6
commit f3332b7201
25 changed files with 234 additions and 37 deletions

View File

@@ -16,4 +16,8 @@ public class PathMeasure {
public boolean getSegment(float start, float end, Path dst, boolean forceClosed) {
return false;
}
public boolean getPosTan(float distance, float[] pos, float[] tan) {
return false;
}
}

View File

@@ -66,22 +66,24 @@ public class DrawableContainer extends Drawable {
@Override
public void draw(Canvas canvas) {
state.drawables[curIndex].draw(canvas);
if (curIndex != -1)
state.drawables[curIndex].draw(canvas);
}
@Override
public int getIntrinsicHeight() {
return state.drawables[curIndex].getIntrinsicHeight();
return curIndex != -1 ? state.drawables[curIndex].getIntrinsicHeight() : -1;
}
@Override
public int getIntrinsicWidth() {
return state.drawables[curIndex].getIntrinsicWidth();
return curIndex != -1 ? state.drawables[curIndex].getIntrinsicWidth() : -1;
}
@Override
public void setBounds(int left, int top, int right, int bottom) {
state.drawables[curIndex].setBounds(left, top, right, bottom);
if (curIndex != -1)
state.drawables[curIndex].setBounds(left, top, right, bottom);
}
public void setEnterFadeDuration(int duration) {}