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
misc stubbing
This commit is contained in:
5
src/api-impl/android/view/Choreographer.java
Normal file
5
src/api-impl/android/view/Choreographer.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.view;
|
||||
|
||||
public final class Choreographer {
|
||||
public static interface FrameCallback {}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package android.view;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.LayoutDirection;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Canvas;
|
||||
|
||||
@@ -746,6 +747,10 @@ public class View extends Object {
|
||||
native_set_size_request(MeasureSpec.getSize(measuredWidth), MeasureSpec.getSize(measuredHeight));
|
||||
}
|
||||
|
||||
public Resources getResources() {
|
||||
return Context.this_application.getResources();
|
||||
}
|
||||
|
||||
public native void setGravity(int gravity);
|
||||
public native void setOnTouchListener(OnTouchListener l);
|
||||
public native void setOnClickListener(OnClickListener l);
|
||||
@@ -758,6 +763,12 @@ public class View extends Object {
|
||||
|
||||
// --- stubs
|
||||
|
||||
public void setContentDescription(CharSequence contentDescription) {
|
||||
System.out.println("setContentDescription called with: >"+contentDescription+"<");
|
||||
}
|
||||
|
||||
public void setId(int id) {}
|
||||
|
||||
public void setOnKeyListener(OnKeyListener l) {}
|
||||
|
||||
public void setFocusable(boolean focusable) {}
|
||||
|
||||
@@ -49,13 +49,8 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
|
||||
public native void addView(View child, int index, LayoutParams params);
|
||||
|
||||
public native void removeView(View view);/* {
|
||||
System.out.println("NOT_IMPLEMENTED: ViewGroup.removeView: Gtk4 doesn't have a generic function for removing a child of GtkView, so you must override this function in the actual widget's class");
|
||||
}*/
|
||||
public native void removeAllViews();/* {
|
||||
System.out.println("NOT_IMPLEMENTED: ViewGroup.removeAllViews: Gtk4 doesn't have a generic function for removing a child of GtkView, so you must override this function in the actual widget's class");
|
||||
new Exception().printStackTrace();
|
||||
}*/
|
||||
public native void removeView(View view);
|
||||
public native void removeAllViews();
|
||||
|
||||
public View getChildAt(int index) {
|
||||
return children.get(index);
|
||||
@@ -67,6 +62,10 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
return new LayoutParams(/*getContext(), attrs*/);
|
||||
}
|
||||
|
||||
public void bringChildToFront(View child) {
|
||||
// TODO: actually implement this (might make sense to implement it in the subclasses instead), when applicable
|
||||
}
|
||||
|
||||
public static class LayoutParams {
|
||||
public static final int FILL_PARENT = -1;
|
||||
public static final int MATCH_PARENT = -1;
|
||||
|
||||
Reference in New Issue
Block a user