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 some stubs needed by android material library
This commit is contained in:
@@ -57,6 +57,8 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
}
|
||||
|
||||
public void addView(View child, int index, LayoutParams params) {
|
||||
if (child.parent == this)
|
||||
return;
|
||||
if (params != null) {
|
||||
child.setLayoutParams(params);
|
||||
}
|
||||
@@ -66,11 +68,17 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
}
|
||||
|
||||
public void removeView(View child) {
|
||||
if (child.parent != this)
|
||||
return;
|
||||
child.parent = null;
|
||||
children.remove(child);
|
||||
native_removeView(widget, child.widget);
|
||||
}
|
||||
|
||||
public void removeViewAt(int index) {
|
||||
removeView(children.get(index));
|
||||
}
|
||||
|
||||
public void removeAllViews() {
|
||||
for (Iterator<View> it = children.iterator(); it.hasNext();) {
|
||||
View child = it.next();
|
||||
@@ -80,6 +88,16 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void detachViewFromParent(int index) {
|
||||
}
|
||||
|
||||
public void attachViewToParent(View view, int index, LayoutParams params) {
|
||||
}
|
||||
|
||||
protected void removeDetachedView(View child, boolean animate) {
|
||||
removeView(child);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
protected native void native_addView(long widget, long child, int index, LayoutParams params);
|
||||
@@ -89,6 +107,10 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
return children.get(index);
|
||||
}
|
||||
|
||||
public int indexOfChild(View child) {
|
||||
return children.indexOf(child);
|
||||
}
|
||||
|
||||
public void updateViewLayout(View view, ViewGroup.LayoutParams params) {}
|
||||
|
||||
public LayoutParams generateLayoutParams(AttributeSet attrs) {
|
||||
@@ -196,6 +218,12 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
|
||||
}
|
||||
|
||||
public void setAddStatesFromChildren(boolean addsStates) {}
|
||||
|
||||
public View getFocusedChild() {return null;}
|
||||
|
||||
public int getDescendantFocusability() {return 0;}
|
||||
|
||||
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