Commit Graph

3 Commits

Author SHA1 Message Date
Schneider Victor-tulias
41f7e169c3 Fix broken gesture nav edu on tablets in portrait.
Launching the gesture nav tutorial in portrait mode on tablets causes fragments with the wrong layout file to be inflated (uses the default phone layout).

Reinflating fragments whenever they need to be switched. Added a new rotation prompt fragment

Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL
Fixes: 291062054
Test: Launched the tutorial in portrait mode and landscape mode, then rotated the screen several times. tried with the flag disabled as well.
Change-Id: I0215d7589285007d04ef81d3a63e404c2cda3895
2023-07-20 15:28:49 -07:00
Saumya Prakash
e2711c254a Enforce the correct orientation for the gesture navigation tutorial
The lottie animations used for the gesture navigation tutorial are
designed for specific orientations depending on the device. This change
ensures that users are in the correct orientation for their device. For large screen users in portrait mode, we display a prompt to rotate the screen.

Flag: ENABLE_NEW_GESTURE_TUTORIAL
Fix: 277781713
Bug: 276515961
Test: Manually went through the tutorial starting from both
orientations on handheld, foldable, and tablet to ensure that the prompt
was shown and hidden correctly. Also ensured that gestures cannot be
completed in the background while the prompt is being shown.

Change-Id: I86ae566721f240264177ad4ec7fc12e58d1b95cd
2023-06-09 21:41:07 +00:00
Andy Wickham
28095168e9 Refactors Sandbox to more easily add new tutorials.
- Extracts abstract classes for common functionality
 - Renames some layouts, etc. to not be back-specific
 - Consolidates more logic in the controllers rather
   than classes like BackGestureTutorialTypeInfo
 - Removes redundant TutorialStep enum (combining it
   with TutorialType)

Still considering removing additional layers of
abstraction like the Fragment itself (instead
keeping UI within the Activity, which would still
be controlled by a TutorialController).

Test: Built and went through the Back tutorial to
confirm existing funcitonality was not disrupted.
Bug: 148542211

Merged-In: Id893869cb59609141dcdbdca01744d0f5952b546
Change-Id: Id893869cb59609141dcdbdca01744d0f5952b546
2020-04-15 18:18:48 +00:00