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
api-impl: misc stubs, additions and fixes
This commit is contained in:
@@ -896,12 +896,16 @@ public class View implements Drawable.Callback {
|
||||
}
|
||||
|
||||
public View(Context context, AttributeSet attrs, int defStyle) {
|
||||
this(context, attrs, defStyle, 0);
|
||||
}
|
||||
|
||||
public View(Context context, AttributeSet attrs, int defStyle, int defStyleRes) {
|
||||
this.context = context;
|
||||
|
||||
widget = native_constructor(context, attrs);
|
||||
|
||||
if (attrs != null) {
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.View, defStyle, 0);
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.View, defStyle, defStyleRes);
|
||||
this.id = a.getResourceId(com.android.internal.R.styleable.View_id, View.NO_ID);
|
||||
if (a.hasValue(com.android.internal.R.styleable.View_background)) {
|
||||
try {
|
||||
@@ -927,7 +931,7 @@ public class View implements Drawable.Callback {
|
||||
}
|
||||
|
||||
int padding = a.getDimensionPixelSize(com.android.internal.R.styleable.View_padding, -1);
|
||||
|
||||
|
||||
int paddingVertical = a.getDimensionPixelSize(com.android.internal.R.styleable.View_paddingVertical, -1);
|
||||
int paddingHorizontal = a.getDimensionPixelSize(com.android.internal.R.styleable.View_paddingHorizontal, -1);
|
||||
|
||||
@@ -974,7 +978,7 @@ public class View implements Drawable.Callback {
|
||||
int textAlignment = a.getInt(com.android.internal.R.styleable.View_textAlignment, 0);
|
||||
setTextAlignment(textAlignment);
|
||||
}
|
||||
|
||||
|
||||
a.recycle();
|
||||
}
|
||||
onCreateDrawableState(0);
|
||||
@@ -2095,4 +2099,7 @@ public class View implements Drawable.Callback {
|
||||
public void setPointerIcon(PointerIcon pointerIcon) {}
|
||||
|
||||
public IBinder getApplicationWindowToken() {return null;}
|
||||
|
||||
public int getVerticalFadingEdgeLength() {return 0;}
|
||||
public int getVerticalScrollbarWidth() {return 0;}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.GskCanvas;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Slog;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Objects;
|
||||
@@ -357,8 +359,11 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
public void setClipToPadding(boolean clipToPadding) {}
|
||||
|
||||
public View findViewById(int id) {
|
||||
if (this.id == id)
|
||||
Slog.v(TAG, "findViewById: looking for id: " + String.format("%x", id) + "(" + getResources().getResourceName(id) + ")" + " | checking: " + this + ",id: " + String.format("%x", this.getId()) + ", id_str: " + this.getIdName());
|
||||
if (this.id == id) {
|
||||
Slog.v(TAG, "findViewById: found: "+this+" | id: " + String.format("%x", this.getId()) + ", id_str: " + this.getIdName());
|
||||
return this;
|
||||
}
|
||||
for (View child: children) {
|
||||
View result = child.findViewById(id);
|
||||
if (result != null)
|
||||
@@ -409,6 +414,14 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void offsetChildrenTopAndBottom(int offset) {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
public final void offsetDescendantRectToMyCoords(View descendant, Rect rect) {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
public static class LayoutParams {
|
||||
public static final int FILL_PARENT = -1;
|
||||
public static final int MATCH_PARENT = -1;
|
||||
@@ -525,7 +538,7 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package android.view.accessibility;
|
||||
|
||||
public class AccessibilityNodeInfo {
|
||||
public static final class AccessibilityAction {
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SHOW_ON_SCREEN = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_TO_POSITION = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_UP = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_LEFT = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_RIGHT = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_SCROLL_DOWN = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityNodeInfo.AccessibilityAction ACTION_CONTEXT_CLICK = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_CONTEXT_CLICK = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SET_PROGRESS = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SHOW_ON_SCREEN = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SCROLL_TO_POSITION = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SCROLL_UP = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SCROLL_LEFT = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SCROLL_RIGHT = new AccessibilityAction(0, null);
|
||||
public static final AccessibilityAction ACTION_SCROLL_DOWN = new AccessibilityAction(0, null);
|
||||
|
||||
|
||||
public AccessibilityAction(int actionId, CharSequence label) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user