add more API stubs for NewPipe

This commit is contained in:
Julian Winkler
2023-09-19 23:22:21 +02:00
parent 2013024971
commit c830abc5f3
34 changed files with 310 additions and 23 deletions

View File

@@ -7,6 +7,8 @@ public class GestureDetector {
public GestureDetector(Context context, OnGestureListener listener, Handler handler) {}
public GestureDetector(Context context, OnGestureListener listener) {}
public interface OnGestureListener {
}

View File

@@ -21,4 +21,6 @@ public interface Menu {
public MenuItem add(CharSequence text);
public void setGroupCheckable(int group, boolean checkable, boolean exclusive);
public SubMenu addSubMenu(int groupId, int itemId, int order, CharSequence title);
}

View File

@@ -28,4 +28,6 @@ public interface MenuItem {
public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener listener);
public MenuItem setTitle(int resId);
}

View File

@@ -2,4 +2,6 @@ package android.view;
public interface SubMenu extends Menu {
public MenuItem getItem();
}

View File

@@ -0,0 +1,18 @@
package android.view;
import android.content.Context;
import android.util.AttributeSet;
public class TextureView extends View {
public TextureView(Context context) {
super(context);
}
public TextureView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public interface SurfaceTextureListener {}
}

View File

@@ -0,0 +1,8 @@
package android.view;
public class VelocityTracker {
public static VelocityTracker obtain() {
return new VelocityTracker();
}
}

View File

@@ -1255,7 +1255,9 @@ public class View extends Object {
public void setTranslationX(float translationX) {}
public void setTranslationY(float translationY) {}
public void setAlpha(float alpha) {}
public void setAlpha(float alpha) {
setVisibility((alpha == 0.f) ? INVISIBLE : VISIBLE);
}
public boolean onGenericMotionEvent(MotionEvent event) {return false;}
@@ -1443,4 +1445,14 @@ public class View extends Object {
public boolean isPaddingRelative() {return false;}
public void setForeground(Drawable foreground) {}
public boolean canScrollVertically(int value) {return true;}
public boolean isInTouchMode() {return false;}
public void stopNestedScroll() {}
public long getDrawingTime() {
return System.currentTimeMillis();
}
}

View File

@@ -289,6 +289,8 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
protected void setChildrenDrawingOrderEnabled(boolean enabled) {}
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {}
public static class LayoutParams {
public static final int FILL_PARENT = -1;
public static final int MATCH_PARENT = -1;

View File

@@ -4,4 +4,6 @@ public interface ViewParent {
public abstract ViewParent getParent();
public boolean isLayoutRequested();
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept);
}