2022-10-02 23:06:56 +02:00
|
|
|
package android.widget;
|
|
|
|
|
|
|
|
|
|
import android.content.Context;
|
2023-06-22 11:45:46 +02:00
|
|
|
import android.util.AttributeSet;
|
|
|
|
|
import android.view.ViewGroup;
|
2022-10-02 23:06:56 +02:00
|
|
|
|
|
|
|
|
public class FrameLayout extends ViewGroup {
|
|
|
|
|
|
2023-07-14 18:02:04 +02:00
|
|
|
public FrameLayout(Context context, AttributeSet attrs) {
|
|
|
|
|
super(context, attrs);
|
2022-10-02 23:06:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public FrameLayout(Context context) {
|
|
|
|
|
super(context);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-17 10:46:24 +02:00
|
|
|
public FrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
|
|
|
super(context, attrs, defStyleAttr);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-02 23:06:56 +02:00
|
|
|
@Override
|
2023-08-17 12:59:37 +02:00
|
|
|
protected native long native_constructor(Context context, AttributeSet attrs);
|
2022-10-02 23:06:56 +02:00
|
|
|
|
2023-08-17 10:46:24 +02:00
|
|
|
@Override
|
|
|
|
|
public LayoutParams generateLayoutParams(AttributeSet attrs) {
|
|
|
|
|
return new LayoutParams(getContext(), attrs);
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-18 11:03:43 +02:00
|
|
|
public static class LayoutParams extends ViewGroup.MarginLayoutParams {
|
2023-08-17 10:46:24 +02:00
|
|
|
public LayoutParams (Context c, AttributeSet attrs) {
|
|
|
|
|
super(c, attrs);
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-22 11:45:46 +02:00
|
|
|
public LayoutParams(int width, int height) {
|
2022-10-02 23:06:56 +02:00
|
|
|
super(width, height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LayoutParams(int width, int height, float weight) {
|
|
|
|
|
super(width, height, weight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LayoutParams(int width, int height, int gravity) {
|
|
|
|
|
this.width = width;
|
|
|
|
|
this.height = height;
|
|
|
|
|
this.gravity = gravity;
|
|
|
|
|
}
|
2023-08-22 14:41:01 +02:00
|
|
|
|
|
|
|
|
public LayoutParams (ViewGroup.LayoutParams params) {
|
|
|
|
|
this.width = params.width;
|
|
|
|
|
this.height = params.height;
|
|
|
|
|
}
|
2022-10-02 23:06:56 +02:00
|
|
|
}
|
|
|
|
|
}
|