summaryrefslogtreecommitdiff
path: root/core/java/android/widget/LinearLayout.java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2015-12-03 07:38:11 -0800
committerChet Haase <chet@google.com>2015-12-08 16:45:23 -0800
commit4610eeff9c6c4789705b6550a57333150d39e970 (patch)
treed777acea26475d105492144f3f7fd80455e3f928 /core/java/android/widget/LinearLayout.java
parentf1b40f65b0a672f17bfebd3c8e93e5f5fb60bdfd (diff)
Revert "Add support for partial view layouts"
This reverts commit c55d5072ac52cee1811b52406419228fa81119ce. There were several bugs related to incorrect handling of various layout issues (layout not being run on containers/views that needed it), reverting to take another run at it outside of master. Issue #25980198 requestLayout() sometimes doesn't result in measure/layout for view Change-Id: Ic0e159cbcf6171652d8fd1bee9ae44a3977cea04
Diffstat (limited to 'core/java/android/widget/LinearLayout.java')
-rw-r--r--core/java/android/widget/LinearLayout.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index bdb1e83438c5..ad939be13a44 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -16,7 +16,6 @@
package android.widget;
-import android.view.ViewParent;
import com.android.internal.R;
import android.annotation.IntDef;
@@ -38,8 +37,6 @@ import android.widget.RemoteViews.RemoteView;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
-import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
/**
* A Layout that arranges its children in a single column or a single row. The direction of
@@ -647,60 +644,6 @@ public class LinearLayout extends ViewGroup {
}
}
- @Override
- public int findDependentLayoutAxes(View child, int axisFilter) {
- // This implementation is almost exactly equivalent to the default implementation
- // offered to the rest of the framework in ViewGroup, but we treat weight to be
- // functionally equivalent to MATCH_PARENT along the orientation axis.
-
- if (!checkPartialLayoutParams(child, LayoutParams.class)) return axisFilter;
- final LayoutParams lp = (LayoutParams) child.getLayoutParams();
- if (child.didLayoutParamsChange()) {
- // Anything could have changed about our previous assumptions.
- return axisFilter;
- }
-
- // Our layout can always end up depending on a WRAP_CONTENT child.
- final int wrapAxisFilter = ((lp.width == WRAP_CONTENT ? FLAG_LAYOUT_AXIS_HORIZONTAL : 0)
- | (lp.height == WRAP_CONTENT ? FLAG_LAYOUT_AXIS_VERTICAL : 0)) & axisFilter;
-
- if (wrapAxisFilter == axisFilter) {
- // We know all queried axes are affected, just return early.
- return wrapAxisFilter;
- }
-
- // Our layout *may* depend on a MATCH_PARENT child, depending on whether we can determine
- // that our layout will remain stable within our parent. We need to ask.
- int matchAxisFilter = ((lp.width == MATCH_PARENT ? FLAG_LAYOUT_AXIS_HORIZONTAL : 0)
- | (lp.height == MATCH_PARENT ? FLAG_LAYOUT_AXIS_VERTICAL : 0)) & axisFilter;
-
- // For LinearLayout, a nonzero weight is equivalent to MATCH_PARENT for this purpose.
- if (lp.weight > 0) {
- if (mOrientation == HORIZONTAL) {
- matchAxisFilter |= FLAG_LAYOUT_AXIS_HORIZONTAL & axisFilter;
- } else {
- matchAxisFilter |= FLAG_LAYOUT_AXIS_VERTICAL & axisFilter;
- }
- }
-
- if (matchAxisFilter != 0 || wrapAxisFilter != 0) {
- final ViewParent parent = getParent();
- if (parent != null) {
- // If our parent depends on us for an axis, then our layout can also be affected
- // by a MATCH_PARENT child along that axis.
- return getParent().findDependentLayoutAxes(this, matchAxisFilter)
- | wrapAxisFilter;
- }
-
- // If we don't have a parent, assume we're affected
- // in any determined affected direction.
- return matchAxisFilter | wrapAxisFilter;
- }
-
- // Two exact sizes and LayoutParams didn't change. We're safe.
- return 0;
- }
-
/**
* Determines where to position dividers between children.
*