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
Add some missing APIs.
android.widget.Filter and android.webkit.MimeTypeMap are copied from AOSP. Other new classes are only stub implementations.
This commit is contained in:
@@ -260,13 +260,13 @@ public class Matrix {
|
||||
* specified transformation.
|
||||
*/
|
||||
public void setScale(float sx, float sy, float px, float py) {
|
||||
native_setScale(native_instance, sx, sy, px, py);
|
||||
// native_setScale(native_instance, sx, sy, px, py);
|
||||
}
|
||||
/**
|
||||
* Set the matrix to scale by sx and sy.
|
||||
*/
|
||||
public void setScale(float sx, float sy) {
|
||||
native_setScale(native_instance, sx, sy);
|
||||
// native_setScale(native_instance, sx, sy);
|
||||
}
|
||||
/**
|
||||
* Set the matrix to rotate by the specified number of degrees, with a pivot
|
||||
|
||||
@@ -19,4 +19,8 @@ public class BitmapDrawable extends Drawable {
|
||||
canvas.drawBitmap(bitmap, new Rect(0, 0, bitmap.getWidth(), bitmap.getWidth()), new RectF(getBounds()), null);
|
||||
}
|
||||
|
||||
public Bitmap getBitmap() {
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import android.graphics.Canvas;
|
||||
|
||||
public class ColorDrawable extends Drawable {
|
||||
|
||||
public ColorDrawable(int color) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@@ -24,7 +24,9 @@ public abstract class Drawable {
|
||||
|
||||
public abstract class ConstantState {
|
||||
|
||||
public abstract Drawable newDrawable(Resources res);
|
||||
public abstract Drawable newDrawable(Resources res);
|
||||
|
||||
public abstract Drawable newDrawable();
|
||||
}
|
||||
|
||||
public void setBounds(int left, int top, int right, int bottom) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
|
||||
public class DrawableContainer extends Drawable {
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'draw'");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,5 +13,7 @@ public class GradientDrawable extends Drawable {
|
||||
public void setColor(int color) {}
|
||||
|
||||
public void setCornerRadius(float cornerRadius) {}
|
||||
|
||||
public void setShape(int shape) {}
|
||||
|
||||
}
|
||||
|
||||
13
src/api-impl/android/graphics/drawable/ScaleDrawable.java
Normal file
13
src/api-impl/android/graphics/drawable/ScaleDrawable.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
|
||||
public class ScaleDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'draw'");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package android.graphics.drawable;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
|
||||
public class StateListDrawable extends Drawable {
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'draw'");
|
||||
}
|
||||
|
||||
public void addState(int[] stateSet, Drawable drawable) {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user