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
setLayoutParams(): better match Androids behaviour
View.setGravity() specifies gravity of children, not of the view itself LayoutParams.weight > 0 should cause expansion of widget
This commit is contained in:
@@ -2,6 +2,7 @@ package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
public class LinearLayout extends ViewGroup {
|
||||
@@ -10,10 +11,12 @@ public class LinearLayout extends ViewGroup {
|
||||
|
||||
public LinearLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
setGravity(Gravity.START | Gravity.TOP);
|
||||
}
|
||||
|
||||
public LinearLayout(Context context) {
|
||||
super(context);
|
||||
setGravity(Gravity.START | Gravity.TOP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user