You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
borrow AnimationDrawable from AOSP
This commit is contained in:
@@ -18,6 +18,7 @@ public class DrawableContainer extends Drawable {
|
||||
if (idx >= 0 && idx < state.childCount && idx != curIndex && state.drawables[idx] != null) {
|
||||
curIndex = idx;
|
||||
native_selectChild(paintable, state.drawables[idx].paintable);
|
||||
invalidateSelf();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -34,7 +35,7 @@ public class DrawableContainer extends Drawable {
|
||||
|
||||
public DrawableContainerState(DrawableContainerState orig, DrawableContainer owner, Resources res) {
|
||||
}
|
||||
|
||||
|
||||
public int getCapacity() {
|
||||
return drawables.length;
|
||||
}
|
||||
@@ -43,6 +44,10 @@ public class DrawableContainer extends Drawable {
|
||||
return childCount;
|
||||
}
|
||||
|
||||
public Drawable getChild(int idx) {
|
||||
return drawables[idx];
|
||||
}
|
||||
|
||||
public int addChild(Drawable dr) {
|
||||
if (childCount >= drawables.length) {
|
||||
growArray(drawables.length, drawables.length * 2);
|
||||
@@ -57,5 +62,5 @@ public class DrawableContainer extends Drawable {
|
||||
drawables = newDrawables;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user