From 8af9b7fd156fc1b6597f359a94ea0b26b3afdc9b Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 21 Nov 2016 18:58:10 -0800 Subject: [PATCH] Improve animations on audio controls, enable push to talk // FREEBIE --- build.gradle | 2 + .../bottom_pause_to_play_animation.xml | 8 ++ .../bottom_play_to_pause_animation.xml | 8 ++ res/animator/rotate_90_animation.xml | 9 +++ res/animator/rotate_minus_90_animation.xml | 9 +++ .../upper_pause_to_play_animation.xml | 8 ++ .../upper_play_to_pause_animation.xml | 8 ++ .../ic_circle_fill_white_48dp.png | Bin 0 -> 1723 bytes .../ic_circle_fill_white_48dp.png | Bin 0 -> 1055 bytes .../ic_circle_fill_white_48dp.png | Bin 0 -> 2365 bytes .../ic_circle_fill_white_48dp.png | Bin 0 -> 1682 bytes .../ic_circle_fill_white_48dp.png | Bin 0 -> 2339 bytes res/drawable/pause_icon.xml | 35 +++++++++ res/drawable/pause_to_play_animation.xml | 18 +++++ res/drawable/play_icon.xml | 34 +++++++++ res/drawable/play_to_pause_animation.xml | 18 +++++ res/layout/audio_view.xml | 5 +- res/layout/conversation_activity.xml | 3 +- res/layout/conversation_item_received.xml | 3 +- res/layout/conversation_item_sent.xml | 3 +- res/values/attrs.xml | 3 +- res/values/integers.xml | 4 + res/values/vector_paths.xml | 20 +++++ .../securesms/ConversationItem.java | 9 ++- .../securesms/components/AudioView.java | 71 ++++++++++++++---- .../securesms/components/InputPanel.java | 4 +- 26 files changed, 259 insertions(+), 23 deletions(-) create mode 100644 res/animator/bottom_pause_to_play_animation.xml create mode 100644 res/animator/bottom_play_to_pause_animation.xml create mode 100644 res/animator/rotate_90_animation.xml create mode 100644 res/animator/rotate_minus_90_animation.xml create mode 100644 res/animator/upper_pause_to_play_animation.xml create mode 100644 res/animator/upper_play_to_pause_animation.xml create mode 100644 res/drawable-hdpi/ic_circle_fill_white_48dp.png create mode 100644 res/drawable-mdpi/ic_circle_fill_white_48dp.png create mode 100644 res/drawable-xhdpi/ic_circle_fill_white_48dp.png create mode 100644 res/drawable-xxhdpi/ic_circle_fill_white_48dp.png create mode 100644 res/drawable-xxxhdpi/ic_circle_fill_white_48dp.png create mode 100644 res/drawable/pause_icon.xml create mode 100644 res/drawable/pause_to_play_animation.xml create mode 100644 res/drawable/play_icon.xml create mode 100644 res/drawable/play_to_pause_animation.xml create mode 100644 res/values/integers.xml create mode 100644 res/values/vector_paths.xml diff --git a/build.gradle b/build.gradle index 19ac98b6b..48c74ccfe 100644 --- a/build.gradle +++ b/build.gradle @@ -169,6 +169,8 @@ android { minSdkVersion 9 targetSdkVersion 22 + vectorDrawables.useSupportLibrary = true + buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L" buildConfigField "String", "TEXTSECURE_URL", "\"https://textsecure-service.whispersystems.org\"" buildConfigField "String", "GIPHY_PROXY_HOST", "\"giphy-proxy-production.whispersystems.org\"" diff --git a/res/animator/bottom_pause_to_play_animation.xml b/res/animator/bottom_pause_to_play_animation.xml new file mode 100644 index 000000000..f5b474bb7 --- /dev/null +++ b/res/animator/bottom_pause_to_play_animation.xml @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/res/animator/bottom_play_to_pause_animation.xml b/res/animator/bottom_play_to_pause_animation.xml new file mode 100644 index 000000000..4f2778d68 --- /dev/null +++ b/res/animator/bottom_play_to_pause_animation.xml @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/res/animator/rotate_90_animation.xml b/res/animator/rotate_90_animation.xml new file mode 100644 index 000000000..7d44ce690 --- /dev/null +++ b/res/animator/rotate_90_animation.xml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/res/animator/rotate_minus_90_animation.xml b/res/animator/rotate_minus_90_animation.xml new file mode 100644 index 000000000..ef9e1b6f1 --- /dev/null +++ b/res/animator/rotate_minus_90_animation.xml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/res/animator/upper_pause_to_play_animation.xml b/res/animator/upper_pause_to_play_animation.xml new file mode 100644 index 000000000..880c7b0b8 --- /dev/null +++ b/res/animator/upper_pause_to_play_animation.xml @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/res/animator/upper_play_to_pause_animation.xml b/res/animator/upper_play_to_pause_animation.xml new file mode 100644 index 000000000..ffa933231 --- /dev/null +++ b/res/animator/upper_play_to_pause_animation.xml @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/res/drawable-hdpi/ic_circle_fill_white_48dp.png b/res/drawable-hdpi/ic_circle_fill_white_48dp.png new file mode 100644 index 0000000000000000000000000000000000000000..a417946f2acf524ad1da066795fa619d57e8baf3 GIT binary patch literal 1723 zcmV;s21NOZP)OnzqLk|ursDlRu z$8}sl1zQ~4PHxZ&?lU;3pmtZM{~7Toe?~=QMlMyAnNtrQT|{R^{CN2zGUCV2nop91 zrU+wp(gw60Q-KOF6{rA{5(w?iF=ryKow3(W#MYTHP15KjIyeaYe}konu+Chy^kL3k zGjiicEf6}q?vx$JJd1f6^Caf+%+1VA%tP!oe>3+pe`c;Qzhr*STxR|d(MDq!l|Zi1 zr!cQ%E-}w!9$K;9KbapfUtzvTMz~O$ji70PFqCwKS1@lRBg{rsj%xz+6{M)L$R;HNrJpm&QBHrGPE9*pvs! zUBjGmH}fjdpN!l4o6c%8C*~ z;67wT<{iu(9ve%ejzH2d=9UMUH{0?xO6QBFg>m5ug?Vk>mOaY6oy=TSS){50 zNrOi-pJiT1>7*;eDWTB`<3hJ3-iw>Gn|U?!H>xO76@jFoW63-{PN(sDO$Z@x+QYn@ z`4d$Tsj3HIo_U@8;*47u7YX@Ax`es6Y-MHlH)wc)`8>5#96;Lw+hF4v%;(6=m!)hh zBhajE7!&dZ)J|~(K9MeBK0xWyHLjw_Atnu8$9$67Esln7xLwP9iX!Ku7=ffBY$`t? zv#HdJzqX1akPeE?*aR;!zoQ6|$_%mlnMY7|_1boE0I^dxv*^Qp(O)j`AW;}kfY->l zsa_p-K_Ea6HHd`i;bP{SRNzIiL+k_Q*^~+-aMk`b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