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
multiple additions and fixes for the Java APIs
Stuff needed for WhatsApp support
This commit is contained in:
@@ -61,6 +61,10 @@ public abstract class AbsListView extends AdapterView {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void setFastScrollEnabled(boolean enabled) {}
|
||||
|
||||
public void setFastScrollAlwaysVisible(boolean alwaysVisible) {}
|
||||
|
||||
public interface OnScrollListener {}
|
||||
|
||||
public interface SelectionBoundsAdjuster {}
|
||||
|
||||
@@ -49,4 +49,8 @@ public abstract class AdapterView extends ViewGroup {
|
||||
public Adapter getAdapter() {
|
||||
return adapter;
|
||||
}
|
||||
|
||||
public Object getItemAtPosition(int position) {
|
||||
return adapter.getItem(position);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.util.AttributeSet;
|
||||
|
||||
public abstract class CompoundButton extends Button implements Checkable {
|
||||
Drawable button_drawable = null;
|
||||
public Drawable mButtonDrawable; // directly accessed by androidx
|
||||
|
||||
public CompoundButton(Context context) {
|
||||
super(context);
|
||||
|
||||
@@ -165,6 +165,8 @@ public class ImageView extends View {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setImageTintMode(PorterDuff.Mode tintMode) {}
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
protected native void native_setPixbuf(long widget, long pixbuf);
|
||||
|
||||
@@ -340,6 +340,11 @@ public class PopupMenu {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setIcon(Drawable icon) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem setVisible(boolean visible) {
|
||||
// GMenu doesn't support invisible items, so we remove them while they're not visible
|
||||
|
||||
@@ -11,6 +11,10 @@ public class PopupWindow {
|
||||
popover = native_constructor();
|
||||
}
|
||||
|
||||
public PopupWindow(Context context) {
|
||||
this(context, null, 0, 0);
|
||||
}
|
||||
|
||||
private View contentView;
|
||||
private long popover; // native pointer to GtkPopover
|
||||
|
||||
|
||||
@@ -280,4 +280,6 @@ public class TextView extends View {
|
||||
public int getMaxWidth() {return 1000;}
|
||||
|
||||
public void nullLayouts() {}
|
||||
|
||||
public void setLinkTextColor(int color) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user