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
Always use addView() and removeView() implementation from ViewGroup
This makes sure, that the index argument is handled correctly everywhere
This commit is contained in:
@@ -2,9 +2,7 @@ package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
public class FrameLayout extends ViewGroup {
|
||||
|
||||
@@ -22,10 +20,6 @@ public class FrameLayout extends ViewGroup {
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
@Override
|
||||
protected native void native_addView(long widget, long child, int index, ViewGroup.LayoutParams params);
|
||||
@Override
|
||||
protected native void native_removeView(long widget, long child);
|
||||
|
||||
@Override
|
||||
public LayoutParams generateLayoutParams(AttributeSet attrs) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
public class LinearLayout extends ViewGroup {
|
||||
@@ -19,10 +18,6 @@ public class LinearLayout extends ViewGroup {
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
@Override
|
||||
protected native void native_addView(long widget, long child, int index, ViewGroup.LayoutParams params);
|
||||
@Override
|
||||
protected native void native_removeView(long widget, long child);
|
||||
|
||||
public native void setOrientation(int orientation);
|
||||
public void setWeightSum(float weightSum) {}
|
||||
|
||||
@@ -2,9 +2,7 @@ package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
public class ScrollView extends ViewGroup {
|
||||
public ScrollView(Context context, AttributeSet attrs) {
|
||||
@@ -17,10 +15,6 @@ public class ScrollView extends ViewGroup {
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
@Override
|
||||
protected native void native_addView(long widget, long child, int index, ViewGroup.LayoutParams params);
|
||||
@Override
|
||||
protected native void native_removeView(long widget, long child);
|
||||
|
||||
public void setFillViewport(boolean fillViewport) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user