diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyPreviewDrawParams.java b/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyPreviewDrawParams.java index e894b286d..2582d5603 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyPreviewDrawParams.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/keyboard/internal/KeyPreviewDrawParams.java @@ -32,15 +32,6 @@ public final class KeyPreviewDrawParams { public final int mPreviewOffset; public final int mPreviewHeight; public final int mPreviewBackgroundResId; - private final int mShowUpAnimatorResId; - private final int mDismissAnimatorResId; - private boolean mHasCustomAnimationParams; - private int mShowUpDuration; - private int mDismissDuration; - private float mShowUpStartXScale; - private float mShowUpStartYScale; - private float mDismissEndXScale; - private float mDismissEndYScale; private int mLingerTimeout; private boolean mShowPopup = true; @@ -78,10 +69,6 @@ public final class KeyPreviewDrawParams { R.styleable.MainKeyboardView_keyPreviewBackground, 0); mLingerTimeout = mainKeyboardViewAttr.getInt( R.styleable.MainKeyboardView_keyPreviewLingerTimeout, 0); - mShowUpAnimatorResId = mainKeyboardViewAttr.getResourceId( - R.styleable.MainKeyboardView_keyPreviewShowUpAnimator, 0); - mDismissAnimatorResId = mainKeyboardViewAttr.getResourceId( - R.styleable.MainKeyboardView_keyPreviewDismissAnimator, 0); } public void setVisibleOffset(final int previewVisibleOffset) { @@ -94,16 +81,15 @@ public final class KeyPreviewDrawParams { public void setGeometry(final View previewTextView) { final int previewWidth = previewTextView.getMeasuredWidth(); - final int previewHeight = mPreviewHeight; // The width and height of visible part of the key preview background. The content marker // of the background 9-patch have to cover the visible part of the background. mVisibleWidth = previewWidth - previewTextView.getPaddingLeft() - previewTextView.getPaddingRight(); - mVisibleHeight = previewHeight - previewTextView.getPaddingTop() + mVisibleHeight = mPreviewHeight - previewTextView.getPaddingTop() - previewTextView.getPaddingBottom(); // The distance between the top edge of the parent key and the bottom of the visible part // of the key preview background. - setVisibleOffset(mPreviewOffset - previewTextView.getPaddingBottom()); + setVisibleOffset(-previewTextView.getPaddingBottom()/2); } public int getVisibleWidth() { @@ -130,59 +116,7 @@ public final class KeyPreviewDrawParams { public void setAnimationParams(final boolean hasCustomAnimationParams, final float showUpStartXScale, final float showUpStartYScale, final int showUpDuration, final float dismissEndXScale, final float dismissEndYScale, final int dismissDuration) { - mHasCustomAnimationParams = hasCustomAnimationParams; - mShowUpStartXScale = showUpStartXScale; - mShowUpStartYScale = showUpStartYScale; - mShowUpDuration = showUpDuration; - mDismissEndXScale = dismissEndXScale; - mDismissEndYScale = dismissEndYScale; - mDismissDuration = dismissDuration; + //TODO: remove } - private static final float KEY_PREVIEW_SHOW_UP_END_SCALE = 1.0f; - private static final AccelerateInterpolator ACCELERATE_INTERPOLATOR = - new AccelerateInterpolator(); - private static final DecelerateInterpolator DECELERATE_INTERPOLATOR = - new DecelerateInterpolator(); - - public Animator createShowUpAnimator(final View target) { - if (mHasCustomAnimationParams) { - final ObjectAnimator scaleXAnimator = ObjectAnimator.ofFloat( - target, View.SCALE_X, mShowUpStartXScale, - KEY_PREVIEW_SHOW_UP_END_SCALE); - final ObjectAnimator scaleYAnimator = ObjectAnimator.ofFloat( - target, View.SCALE_Y, mShowUpStartYScale, - KEY_PREVIEW_SHOW_UP_END_SCALE); - final AnimatorSet showUpAnimator = new AnimatorSet(); - showUpAnimator.play(scaleXAnimator).with(scaleYAnimator); - showUpAnimator.setDuration(mShowUpDuration); - showUpAnimator.setInterpolator(DECELERATE_INTERPOLATOR); - return showUpAnimator; - } - final Animator animator = AnimatorInflater.loadAnimator( - target.getContext(), mShowUpAnimatorResId); - animator.setTarget(target); - animator.setInterpolator(DECELERATE_INTERPOLATOR); - return animator; - } - - public Animator createDismissAnimator(final View target) { - if (mHasCustomAnimationParams) { - final ObjectAnimator scaleXAnimator = ObjectAnimator.ofFloat( - target, View.SCALE_X, mDismissEndXScale); - final ObjectAnimator scaleYAnimator = ObjectAnimator.ofFloat( - target, View.SCALE_Y, mDismissEndYScale); - final AnimatorSet dismissAnimator = new AnimatorSet(); - dismissAnimator.play(scaleXAnimator).with(scaleYAnimator); - final int dismissDuration = Math.min(mDismissDuration, mLingerTimeout); - dismissAnimator.setDuration(dismissDuration); - dismissAnimator.setInterpolator(ACCELERATE_INTERPOLATOR); - return dismissAnimator; - } - final Animator animator = AnimatorInflater.loadAnimator( - target.getContext(), mDismissAnimatorResId); - animator.setTarget(target); - animator.setInterpolator(ACCELERATE_INTERPOLATOR); - return animator; - } } diff --git a/app/src/main/res/drawable/btn_keyboard_key_popup_lxx_dark.xml b/app/src/main/res/drawable/btn_keyboard_key_popup_lxx_dark.xml index dee645712..652e8018c 100644 --- a/app/src/main/res/drawable/btn_keyboard_key_popup_lxx_dark.xml +++ b/app/src/main/res/drawable/btn_keyboard_key_popup_lxx_dark.xml @@ -16,6 +16,6 @@ + android:drawable="@drawable/btn_keyboard_key_popup_selected_ics" /> diff --git a/app/src/main/res/values-land/keyboard-heights.xml b/app/src/main/res/values-land/keyboard-heights.xml deleted file mode 100644 index 02d8b14c8..000000000 --- a/app/src/main/res/values-land/keyboard-heights.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - HARDWARE=sholes,194.3333 - - HARDWARE=mahimahi,186.2667 - - HARDWARE=herring,171.9385 - - HARDWARE=tuna,173.4207 - - - HARDWARE=stingray,265.4378 - - HARDWARE=flounder,272.0 - - diff --git a/app/src/main/res/values-v18/emoji-categories.xml b/app/src/main/res/values-v18/emoji-categories.xml deleted file mode 100644 index 55738fadc..000000000 --- a/app/src/main/res/values-v18/emoji-categories.xml +++ /dev/null @@ -1,908 +0,0 @@ - - - - - - 1f415 - 1f436 - 1f429 - - 1f431 - - - 1f42d - 1f439 - 1f422 - - 1f430 - - 1f414 - 1f423 - 1f424 - 1f425 - 1f426 - - 1f411 - - 1f43a - - - - 1f42e - 1f434 - 1f417 - - 1f437 - 1f43d - 1f438 - 1f40d - 1f43c - 1f427 - 1f418 - 1f428 - 1f412 - 1f435 - - 1f42f - 1f43b - 1f42b - - - 1f433 - - 1f41f - 1f420 - 1f421 - 1f419 - 1f41a - 1f42c - 1f40c - 1f41b - 1f41c - 1f41d - 1f41e - 1f432 - - 1f43e - 1f378 - 1f37a - 1f37b - 1f377 - 1f379 - 1f376 - - 1f375 - - 1f374 - 1f368 - 1f367 - 1f366 - 1f369 - 1f370 - 1f36a - 1f36b - 1f36c - 1f36d - 1f36e - 1f36f - 1f373 - 1f354 - 1f35f - 1f35d - 1f355 - 1f356 - 1f357 - 1f364 - 1f363 - 1f371 - 1f35e - 1f35c - 1f359 - 1f35a - 1f35b - 1f372 - 1f365 - 1f362 - 1f361 - 1f358 - 1f360 - 1f34c - 1f34e - 1f34f - 1f34a - - 1f344 - 1f345 - 1f346 - 1f347 - 1f348 - 1f349 - - 1f351 - 1f352 - 1f353 - 1f34d - 1f330 - 1f331 - - - 1f334 - 1f335 - 1f337 - 1f338 - 1f339 - 1f340 - 1f341 - 1f342 - 1f343 - 1f33a - 1f33b - 1f33c - 1f33d - 1f33e - 1f33f - 2600 - 1f308 - 26c5 - 2601 - 1f301 - 1f302 - - 1f4a7 - 26a1 - 1f300 - 2744 - 26c4 - 1f319 - - - - 1f31b - - 1f311 - - 1f313 - 1f314 - 1f315 - - - - 1f391 - 1f304 - 1f305 - 1f307 - 1f306 - 1f303 - 1f30c - 1f309 - 1f30a - 1f30b - - 1f30f - - - - - - - - - - - - - - - - - 1f51d - 1f519 - 1f51b - 1f51c - 1f51a - 23f3 - 231b - 23f0 - 2648 - 2649 - 264a - 264b - 264c - 264d - 264e - 264f - 2650 - 2651 - 2652 - 2653 - 26ce - 1f531 - 1f52f - 1f6bb - - - - - 1f170 - 1f171 - 1f18e - 1f17e - 1f4ae - 1f4af - 1f520 - 1f521 - 1f522 - 1f523 - 1f524 - 27bf - 1f4f6 - 1f4f3 - 1f4f4 - - 1f6b9 - 1f6ba - 1f6bc - 267f - 267b - 1f6ad - 1f6a9 - 26a0 - 1f201 - 1f51e - 26d4 - 1f192 - 1f197 - 1f195 - 1f198 - 1f199 - 1f193 - 1f196 - 1f19a - 1f232 - 1f233 - 1f234 - 1f235 - 1f236 - 1f237 - 1f238 - 1f239 - 1f202 - 1f23a - 1f250 - 1f251 - 3299 - 00ae - 00a9 - 2122 - 1f21a - 1f22f - 3297 - 2b55 - 274c - 274e - 2139 - 1f6ab - 2705 - 2714 - 1f517 - 2734 - 2733 - 2795 - 2796 - 2716 - 2797 - 1f4a0 - 1f4a1 - 1f4a4 - 1f4a2 - 1f525 - 1f4a5 - 1f4a8 - 1f4a6 - 1f4ab - 1f55b - - 1f550 - - 1f551 - - 1f552 - - 1f553 - - 1f554 - - 1f555 - - 1f556 - - 1f557 - - 1f558 - - 1f559 - - 1f55a - - 2195 - 2b06 - 2197 - 27a1 - 2198 - 2b07 - 2199 - 2b05 - 2196 - 2194 - 2934 - 2935 - 23ea - 23eb - 23ec - 23e9 - 25c0 - 25b6 - 1f53d - 1f53c - 2747 - 2728 - 1f534 - 1f535 - 26aa - 26ab - 1f533 - 1f532 - 2b50 - 1f31f - 1f320 - 25ab - 25aa - 25fd - 25fe - 25fb - 25fc - 2b1c - 2b1b - 1f538 - 1f539 - 1f536 - 1f537 - 1f53a - 1f53b - 2754 - 2753 - 2755 - 2757 - 203c - 2049 - 3030 - 27b0 - 2660 - 2665 - 2663 - 2666 - 1f194 - 1f511 - 21a9 - 1f191 - 1f50d - 1f512 - 1f513 - 21aa - 1f510 - - 1f518 - 1f50e - 1f516 - 1f50f - 1f503 - - - - - 1f4e7 - - - - - - 1f50a - - - 263a - 1f60a - - 1f601 - 1f602 - 1f603 - 1f604 - 1f605 - 1f606 - - - 1f609 - - - - - 1f620 - - 1f621 - 1f622 - - - 1f623 - 1f624 - 1f625 - - - 1f628 - 1f629 - 1f630 - - 1f631 - 1f632 - 1f633 - 1f635 - - 1f637 - 1f61e - 1f612 - 1f60d - - 1f61c - 1f61d - 1f60b - - - 1f618 - 1f61a - - 1f62d - 1f60c - 1f616 - 1f614 - 1f62a - 1f60f - 1f613 - 1f62b - 1f64b - 1f64c - 1f64d - 1f645 - 1f646 - 1f647 - 1f64e - 1f64f - 1f63a - 1f63c - 1f638 - 1f639 - 1f63b - 1f63d - 1f63f - 1f63e - 1f640 - 1f648 - 1f649 - 1f64a - 1f4a9 - 1f476 - 1f466 - 1f467 - 1f468 - 1f469 - 1f474 - 1f475 - 1f48f - 1f491 - 1f46a - 1f46b - - - 1f464 - - 1f46e - 1f477 - 1f481 - 1f482 - 1f46f - 1f470 - 1f478 - 1f385 - 1f47c - - - - 1f483 - 1f486 - 1f487 - 1f485 - 1f47b - 1f479 - 1f47a - 1f47d - 1f47e - 1f47f - 1f480 - 1f4aa - 1f440 - 1f442 - 1f443 - 1f463 - 1f444 - 1f445 - 1f48b - 2764 - 1f499 - 1f49a - 1f49b - 1f49c - 1f493 - 1f494 - 1f495 - 1f496 - 1f497 - 1f498 - 1f49d - 1f49e - 1f49f - 1f44d - 1f44e - 1f44c - 270a - 270c - 270b - 1f44a - - 1f446 - 1f447 - 1f448 - 1f449 - 1f44b - 1f44f - - - - 1f530 - 1f484 - 1f45e - 1f45f - 1f451 - 1f452 - 1f3a9 - 1f393 - 1f453 - 231a - 1f454 - 1f455 - 1f456 - 1f457 - 1f458 - 1f459 - 1f460 - 1f461 - 1f462 - 1f45a - 1f45c - 1f4bc - 1f392 - 1f45d - 1f45b - 1f4b0 - 1f4b3 - 1f4b2 - 1f4b5 - 1f4b4 - - - 1f4b8 - 1f4b1 - 1f4b9 - 1f52b - 1f52a - 1f4a3 - 1f489 - 1f48a - 1f6ac - 1f514 - - 1f6aa - - - 1f52e - 1f526 - 1f50b - 1f50c - 1f4dc - 1f4d7 - 1f4d8 - 1f4d9 - 1f4da - 1f4d4 - 1f4d2 - 1f4d1 - 1f4d3 - 1f4d5 - 1f4d6 - 1f4f0 - 1f4db - 1f383 - 1f384 - 1f380 - 1f381 - 1f382 - 1f388 - 1f386 - 1f387 - 1f389 - 1f38a - 1f38d - 1f38f - 1f38c - 1f390 - 1f38b - 1f38e - 1f4f1 - 1f4f2 - 1f4df - 260e - 1f4de - 1f4e0 - 1f4e6 - 2709 - 1f4e8 - 1f4e9 - 1f4ea - 1f4eb - - - 1f4ee - 1f4e4 - 1f4e5 - - 1f4e2 - 1f4e3 - 1f4e1 - 1f4ac - - 2712 - 270f - 1f4dd - 1f4cf - 1f4d0 - 1f4cd - 1f4cc - 1f4ce - 2702 - 1f4ba - 1f4bb - 1f4bd - 1f4be - 1f4bf - 1f4c6 - 1f4c5 - 1f4c7 - 1f4cb - 1f4c1 - 1f4c2 - 1f4c3 - 1f4c4 - 1f4ca - 1f4c8 - 1f4c9 - 26fa - 1f3a1 - 1f3a2 - 1f3a0 - 1f3aa - 1f3a8 - 1f3ac - 1f3a5 - 1f4f7 - 1f4f9 - 1f3a6 - 1f3ad - 1f3ab - 1f3ae - 1f3b2 - 1f3b0 - 1f0cf - 1f3b4 - 1f004 - 1f3af - 1f4fa - 1f4fb - 1f4c0 - 1f4fc - 1f3a7 - 1f3a4 - 1f3b5 - 1f3b6 - 1f3bc - 1f3bb - 1f3b9 - 1f3b7 - 1f3ba - 1f3b8 - 303d - - - 1f3e0 - 1f3e1 - 1f3e2 - 1f3e3 - - 1f3e5 - 1f3e6 - 1f3e7 - 1f3e8 - 1f3e9 - 1f3ea - 1f3eb - 26ea - 26f2 - 1f3ec - 1f3ef - 1f3f0 - 1f3ed - 1f5fb - 1f5fc - 1f5fd - 1f5fe - 1f5ff - 2693 - 1f3ee - 1f488 - 1f527 - 1f528 - 1f529 - - - 1f6c0 - 1f6bd - 1f6be - 1f3bd - 1f3a3 - 1f3b1 - 1f3b3 - 26be - 26f3 - 1f3be - 26bd - 1f3bf - 1f3c0 - 1f3c1 - 1f3c2 - 1f3c3 - 1f3c4 - 1f3c6 - - 1f40e - 1f3c8 - - 1f3ca - - 1f683 - 1f684 - 1f685 - - 1f687 - 24c2 - - - - 1f68c - - - 1f68f - - 1f691 - 1f692 - 1f693 - - 1f695 - - 1f697 - - 1f699 - - - - - - - - - 1f6a2 - - - 2708 - - - - - 26f5 - 1f6b2 - - - - - - 1f689 - 1f680 - 1f6a4 - 1f6b6 - 26fd - 1f17f - 1f6a5 - - 1f6a7 - 1f6a8 - 2668 - 1f48c - 1f48d - 1f48e - 1f490 - 1f492 - fe4e5|1f1ef,1f1f5 - fe4e6|1f1fa,1f1f8 - fe4e7|1f1eb,1f1f7 - fe4e8|1f1e9,1f1ea - fe4e9|1f1ee,1f1f9 - fe4ea|1f1ec,1f1e7 - fe4eb|1f1ea,1f1f8 - fe4ec|1f1f7,1f1fa - fe4ed|1f1e8,1f1f3 - fe4ee|1f1f0,1f1f7 - - - =-O - :-P - ;-) - :-( - :-) - :-! - :-$ - B-) - :O - :-* - :-D - :\'( - :-\\ - O:-) - :-[ - - diff --git a/app/src/main/res/values/keyboard-heights.xml b/app/src/main/res/values/keyboard-heights.xml deleted file mode 100644 index 12dd51d9d..000000000 --- a/app/src/main/res/values/keyboard-heights.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - HARDWARE=sholes,227.0167 - - HARDWARE=mahimahi,217.5932 - - HARDWARE=herring,200.8554 - - HARDWARE=tuna,202.5869 - - - HARDWARE=stingray,283.1337 - -