From 997b7be4c005696df91dc1833b4fb4db6c984991 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 18 Nov 2024 00:13:08 +0100 Subject: [PATCH] launcher: Animated vector describing swipe gesture Replace the short video with an animated vector image that shows the swipe gesture. This is much lighter and reliable than the mp4 video, which failed to play on many devices. Source for the image of the key is in inkscape SVG format in srcs/res and is converted to an android drawable when needed. The swipe animation is hand-written. --- build.gradle | 2 +- res/drawable/doc_anim_swipe.xml | 25 +++ res/drawable/doc_key_u.xml | 25 +++ res/layout/launcher_activity.xml | 2 +- res/raw/intro_video.mp4 | Bin 123771 -> 0 bytes res/values/styles.xml | 7 + srcs/juloo.keyboard2/LauncherActivity.java | 61 +++---- srcs/res/SvgToVector.java | 32 ++++ srcs/res/doc_key.svg | 192 +++++++++++++++++++++ srcs/res/gen_doc_key_drawables.sh | 25 +++ 10 files changed, 340 insertions(+), 31 deletions(-) create mode 100644 res/drawable/doc_anim_swipe.xml create mode 100644 res/drawable/doc_key_u.xml delete mode 100644 res/raw/intro_video.mp4 create mode 100644 srcs/res/SvgToVector.java create mode 100644 srcs/res/doc_key.svg create mode 100644 srcs/res/gen_doc_key_drawables.sh diff --git a/build.gradle b/build.gradle index 0cb6160..686f84f 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ android { sourceSets { main { manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['srcs'] + java.srcDirs = ['srcs/juloo.keyboard2'] res.srcDirs = ['res', 'build/generated-resources'] assets.srcDirs = ['assets'] } diff --git a/res/drawable/doc_anim_swipe.xml b/res/drawable/doc_anim_swipe.xml new file mode 100644 index 0000000..6e91d30 --- /dev/null +++ b/res/drawable/doc_anim_swipe.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/doc_key_u.xml b/res/drawable/doc_key_u.xml new file mode 100644 index 0000000..4a94fe2 --- /dev/null +++ b/res/drawable/doc_key_u.xml @@ -0,0 +1,25 @@ + + + + + + diff --git a/res/layout/launcher_activity.xml b/res/layout/launcher_activity.xml index 4e0cc0c..67b3eb6 100644 --- a/res/layout/launcher_activity.xml +++ b/res/layout/launcher_activity.xml @@ -4,7 +4,7 @@