Drawable: stub 'ripple' as transparent ColorDrawable, fix view.setBackgroundColor for buttons

This commit is contained in:
Mis012
2024-02-18 00:30:36 +01:00
parent dddc95ded3
commit 72d6ad9914
4 changed files with 7 additions and 5 deletions

View File

@@ -11,5 +11,5 @@ public class ColorDrawable extends Drawable {
public int getColor() {
return color;
}
}

View File

@@ -43,7 +43,7 @@ public class Drawable {
public ConstantState getConstantState() {
return null;
}
public abstract class ConstantState {
public abstract Drawable newDrawable(Resources res);
@@ -131,6 +131,9 @@ public class Drawable {
return drawable;
} else if ("transition".equals(parser.getName())) {
return new Drawable();
} else if ("ripple".equals(parser.getName())) {
// FIXME: the non-pressed state of RippleDrawable should be equivalent to this
return new ColorDrawable(0);
}
return null;
}

View File

@@ -12,5 +12,4 @@ public class RippleDrawable extends Drawable {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
}