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 more API stubs for NewPipe
This commit is contained in:
@@ -7,6 +7,8 @@ public class GestureDetector {
|
||||
|
||||
public GestureDetector(Context context, OnGestureListener listener, Handler handler) {}
|
||||
|
||||
public GestureDetector(Context context, OnGestureListener listener) {}
|
||||
|
||||
public interface OnGestureListener {
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -28,4 +28,6 @@ public interface MenuItem {
|
||||
|
||||
public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener listener);
|
||||
|
||||
public MenuItem setTitle(int resId);
|
||||
|
||||
}
|
||||
@@ -2,4 +2,6 @@ package android.view;
|
||||
|
||||
public interface SubMenu extends Menu {
|
||||
|
||||
public MenuItem getItem();
|
||||
|
||||
}
|
||||
|
||||
18
src/api-impl/android/view/TextureView.java
Normal file
18
src/api-impl/android/view/TextureView.java
Normal 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 {}
|
||||
|
||||
}
|
||||
8
src/api-impl/android/view/VelocityTracker.java
Normal file
8
src/api-impl/android/view/VelocityTracker.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package android.view;
|
||||
|
||||
public class VelocityTracker {
|
||||
|
||||
public static VelocityTracker obtain() {
|
||||
return new VelocityTracker();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -4,4 +4,6 @@ public interface ViewParent {
|
||||
public abstract ViewParent getParent();
|
||||
|
||||
public boolean isLayoutRequested();
|
||||
|
||||
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user