mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 17:48:20 +00:00
Adds dummy HomeGestureTutorialFragment.
- Adds a new launch target in Dev options - Moves Back handling to the parent TutorialFragment (so all Tutorials can handle it as necessary) - Currently uses a dummy translating rectangle in place of a proper hand animation - No actual home gesture recognition is in place yet Test: Manual Bug: 148542211 Change-Id: Ic5a545eb9f5003914803272c8ffe367220d63336
This commit is contained in:
@@ -216,17 +216,27 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat {
|
||||
if (launchSandboxIntent.resolveActivity(context.getPackageManager()) == null) {
|
||||
return;
|
||||
}
|
||||
PreferenceCategory sandboxCategory = newCategory("Sandbox");
|
||||
Preference launchSandboxPreference = new Preference(context);
|
||||
launchSandboxPreference.setKey("launchSandbox");
|
||||
launchSandboxPreference.setTitle("Launch Gesture Navigation Sandbox");
|
||||
launchSandboxPreference.setSummary(
|
||||
"This provides tutorials and a place to practice navigation gestures.");
|
||||
launchSandboxPreference.setOnPreferenceClickListener(preference -> {
|
||||
startActivity(launchSandboxIntent);
|
||||
PreferenceCategory sandboxCategory = newCategory("Gesture Navigation Sandbox");
|
||||
sandboxCategory.setSummary("Learn and practice navigation gestures");
|
||||
Preference launchBackTutorialPreference = new Preference(context);
|
||||
launchBackTutorialPreference.setKey("launchBackTutorial");
|
||||
launchBackTutorialPreference.setTitle("Launch Back Tutorial");
|
||||
launchBackTutorialPreference.setSummary("Learn how to use the Back gesture");
|
||||
launchBackTutorialPreference.setOnPreferenceClickListener(preference -> {
|
||||
startActivity(launchSandboxIntent.putExtra(
|
||||
"tutorial_type", "RIGHT_EDGE_BACK_NAVIGATION"));
|
||||
return true;
|
||||
});
|
||||
sandboxCategory.addPreference(launchSandboxPreference);
|
||||
sandboxCategory.addPreference(launchBackTutorialPreference);
|
||||
Preference launchHomeTutorialPreference = new Preference(context);
|
||||
launchHomeTutorialPreference.setKey("launchHomeTutorial");
|
||||
launchHomeTutorialPreference.setTitle("Launch Home Tutorial");
|
||||
launchHomeTutorialPreference.setSummary("Learn how to use the Home gesture");
|
||||
launchHomeTutorialPreference.setOnPreferenceClickListener(preference -> {
|
||||
startActivity(launchSandboxIntent.putExtra("tutorial_type", "HOME_NAVIGATION"));
|
||||
return true;
|
||||
});
|
||||
sandboxCategory.addPreference(launchHomeTutorialPreference);
|
||||
}
|
||||
|
||||
private String toName(String action) {
|
||||
|
||||
Reference in New Issue
Block a user