FlexboxLayout exposes a method for clearing the orders cache

This commit is contained in:
zh-m
2017-01-10 17:54:56 +02:00
parent 47efe715c7
commit f4c12a183c

View File

@@ -518,6 +518,15 @@ public class FlexboxLayout extends ViewGroup {
return false;
}
/**
* Invalidates the cache of the orders so that they are recalculated.
*/
public void invalidateOrdersCache() {
if (this.mOrderCache != null) {
this.mOrderCache.clear();
}
}
/**
* Sub method for {@link #onMeasure(int, int)}, when the main axis direction is horizontal
* (either left to right or right to left).