multiple additions and fixes for the Java APIs

Stuff needed for WhatsApp support
This commit is contained in:
Julian Winkler
2024-06-24 18:44:31 +02:00
committed by Mis012
parent ef77bb287a
commit 3c5a21357d
53 changed files with 357 additions and 43 deletions

View File

@@ -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 {}

View File

@@ -49,4 +49,8 @@ public abstract class AdapterView extends ViewGroup {
public Adapter getAdapter() {
return adapter;
}
public Object getItemAtPosition(int position) {
return adapter.getItem(position);
}
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -280,4 +280,6 @@ public class TextView extends View {
public int getMaxWidth() {return 1000;}
public void nullLayouts() {}
public void setLinkTextColor(int color) {}
}