forked from extern/Unexpected-Keyboard
997b7be4c0
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.
26 lines
539 B
Bash
26 lines
539 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
cd "$(dirname $0)"
|
|
|
|
DRAWABLE_DIR=../../res/drawable
|
|
ANDROID_LIB=$ANDROID_SDK_ROOT/tools/lib
|
|
|
|
first () { echo "$1"; }
|
|
JAVA_ARGS=(
|
|
-classpath
|
|
"$(first $ANDROID_LIB/sdk-common-*.jar):$(first $ANDROID_LIB/common-*.jar)"
|
|
)
|
|
svg_to_vector ()
|
|
{
|
|
java "${JAVA_ARGS[@]}" SvgToVector.java "$@"
|
|
}
|
|
|
|
TMP=`mktemp -d`
|
|
trap "rm -r '$TMP'" EXIT
|
|
set -x
|
|
|
|
inkscape doc_key.svg -o "$TMP/doc_key_u.svg" -C --export-page 2 --export-plain-svg --export-text-to-path
|
|
|
|
svg_to_vector "$TMP/doc_key_u.svg" "$DRAWABLE_DIR/doc_key_u.xml"
|