Merge change 7857 into donut
* changes: Remove exception throw when a view has a self dependency inside a RelativeLayout.
This commit is contained in:
@@ -1295,11 +1295,8 @@ public class RelativeLayout extends ViewGroup {
|
|||||||
if (rule > 0) {
|
if (rule > 0) {
|
||||||
// The node this node depends on
|
// The node this node depends on
|
||||||
final Node dependency = keyNodes.get(rule);
|
final Node dependency = keyNodes.get(rule);
|
||||||
if (dependency == node) {
|
// Skip unknowns and self dependencies
|
||||||
throw new IllegalStateException("A view cannot have a dependency" +
|
if (dependency == null || dependency == node) {
|
||||||
" on itself");
|
|
||||||
}
|
|
||||||
if (dependency == null) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Add the current node as a dependent
|
// Add the current node as a dependent
|
||||||
|
|||||||
Reference in New Issue
Block a user