Add double tap callback for divider bar

Add a callback in split layout to notify registered listener when users
double tapped the divider bar. Use this callback to switch side stage
position.

Bug: 176061049
Test: atest SplitLayoutTests
Test: manual check stage position changed when double tapped divider bar
Change-Id: Id3929b01a194b8eb0838cc892156bbbe48dc8690
This commit is contained in:
Jerry Chang
2021-01-13 14:35:40 +08:00
committed by Wale Ogunwale
parent 884719cd66
commit d19771c9af
4 changed files with 37 additions and 0 deletions

View File

@@ -82,6 +82,12 @@ public class SplitLayoutTests extends ShellTestCase {
verify(mLayoutChangeListener).onBoundsChanged(any(SplitLayout.class));
}
@Test
public void testOnDoubleTappedDivider() {
mSplitLayout.onDoubleTappedDivider();
verify(mLayoutChangeListener).onDoubleTappedDivider();
}
@Test
@UiThreadTest
public void testSnapToDismissTarget() {