Skip to content
Snippets Groups Projects
Commit 736b0853 authored by Todd Lee's avatar Todd Lee
Browse files

Add API for detection of 'closing' mode

Test: build
Change-Id: Ic8b3193a1e5d0475e875cd06881c2d21295cdd0f
parent 57882662
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ public class TransitionUtil {
/** Returns {@code true} if the transition is opening or closing mode. */
public static boolean isOpenOrCloseMode(@TransitionInfo.TransitionMode int mode) {
return isOpeningMode(mode) || mode == TRANSIT_CLOSE || mode == TRANSIT_TO_BACK;
return isOpeningMode(mode) || isClosingMode(mode);
}
/** Returns {@code true} if the transition is opening mode. */
......@@ -77,6 +77,11 @@ public class TransitionUtil {
return mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT;
}
/** Returns {@code true} if the transition is closing mode. */
public static boolean isClosingMode(@TransitionInfo.TransitionMode int mode) {
return mode == TRANSIT_CLOSE || mode == TRANSIT_TO_BACK;
}
/** Returns {@code true} if the transition has a display change. */
public static boolean hasDisplayChange(@NonNull TransitionInfo info) {
for (int i = info.getChanges().size() - 1; i >= 0; --i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment