From 9ea53d7b1e6777c3ca440cc52f278daf2f2cc209 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Thu, 17 Sep 2015 17:53:09 -0700 Subject: [PATCH] fix gingerbread view issues Closes #4085 // FREEBIE --- .../transfer_controls_background.9.png | Bin 1122 -> 1228 bytes .../transfer_controls_background.9.png | Bin 675 -> 694 bytes .../transfer_controls_background.9.png | Bin 1331 -> 1451 bytes .../transfer_controls_background.9.png | Bin 2678 -> 3104 bytes .../transfer_controls_background.9.png | Bin 2887 -> 3110 bytes .../securesms/components/AnimatingToggle.java | 3 ++ .../components/TransferControlView.java | 31 +++++------ .../thoughtcrime/securesms/util/ResUtil.java | 6 ++- .../thoughtcrime/securesms/util/ViewUtil.java | 48 +++++++++++------- 9 files changed, 55 insertions(+), 33 deletions(-) diff --git a/res/drawable-hdpi/transfer_controls_background.9.png b/res/drawable-hdpi/transfer_controls_background.9.png index 0e503fb5126da06dce91c323dbad158315ebee09..c7b7f575f4513155056f64d2d92309899f9a73e4 100644 GIT binary patch delta 1208 zcmV;p1V{Vg2+RqPB!81hL_t(|0qxv1a9c?n2JokG-g(AcC2bmsX0m93<5C}iP9GA!bRMM4Uuzf+{Q)hqAe6NLW&Z3MI2a)UfhQ$Di1J- zrE%~IrHJ8LwwStb5*Y|blEF#pVvXTiMTnS#9k>JGccAp()}R;mCZH!%Pam<(_;Ut$?; zh6qwK+EF!L=ArB&}rq3Y)moK6gC(1=8e;eiIk2NWBbxEVr+(54ZH+@#%l5V0dYVOU~}a8VQDr8tHq zvPRt2gm^pAI2*d!5Ym0mO1;Ai+>Kis{MOW|4&r?zZb{FuN%~BMof*ze;WG#U)29!|F~GY zF@Hj6(|iR^vvt%a?N`HNG(PtYH%L4PybWJvvMXzYw(4JXTvo(;h)a)o(5V2Mr<|8O1EtS zerIZGp*P>wX?XKZda-`5J~8n72Kcw zZ7oWCZ&kV9J+;oa&)4&`&YkWl>9?zu^5tL1fHgH*?qLrcT0QQ8YvraNZGNBOihl>Z zEA*M%=BHC9W1labjMBR6PP*g9$~Jbgx$5+zHc~fEIoOYSin>|j@)+?7WxI+gMq6k%F6G@-d|&;0000r#7%EtX%TwypGAwv+cyFm7XgTob z4>L2_4qawuvgT#OoLOGcbg9o1d}a?EC-wQsDW;fW(w$PdpYHZXXiDut9RWgm9xu~t zc$uC@hyZo9ho-y{y1U%(lx%zNyF5vY2=NwwO~?5v^h)8Ybbp+`##?C8B2PN56~y^b zZqPwo#C7gMuQ%MqbzG!_+^CH?rJNGW{pE@B!)Wm>=&girqvJ1?C(8Y~BF+r)0= zh@fLhgj4?8sLu@LgjlIzKW;$Bo*UR-p3RuJbC4_iHFTnBp}KQ08)6SUd_Y&AlMY?M z2k@Mpw23Y^l7HnH%%&J8&2}w>iu^wn$V1Xd}uoF@Hiw4Qz$z@+Z)F4}apgn+YmbItIZHyw4tp@+i^Ea?BNEqP2q;qvmqipx?&fRuE5&> zapxdDfVM6l?i^e%6DM%WZX!EBlmA|n z|A{L9dr|(c8~MLc<^R)=|9?^bzkc~^H}Y5DBZDaE?=+6?c-+9JDMYwu)2563&JTKjBX# z{GJ9vr>D4WV~($+-kB0`^R2kQXxu{WSa1uqxJzvHjc_92_xh<8V><&c(Am5JQ5W8^ zLA9bO#pb>n`i6JNZY}y$4J6(@MUT_j%zr*&9&_AO8pM2+$qTmQtDrZ<9yo+4_rQgY zn?;-7`?#C}@N%kce#RP46)lOKjK;bv9Z05GlMa+;bJLHCy8lkh{iyF`-;Zi+`0%8^ z6i>@7@8ikbwA`9g8$(D3aS1mz^qfYxflG7{VP)JYS<*P|?M0K`Mr-ZHX|(8VdPd6I zYfIy_(HpKty=h<3A_6r1=kW@?#xK$T(L_LtzVfEksJh33-thFMm|}hsmp|rb-7z1g T0b(}900000NkvXXu0mjf2Ad{) diff --git a/res/drawable-mdpi/transfer_controls_background.9.png b/res/drawable-mdpi/transfer_controls_background.9.png index 3e632049683d808e77b4aec6cf67fe9374b6e5d1..5e8b65b45d27738b892aca82397f83fa7b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$ zd(oBOPH$}0zSfxvRj)9pka&FG{qy^ivNr3rGFF}cS;<Xi|cUGK=US+=LrFmuC zr0G-URbOM@T%obPV#kLq_UWb3aRt?)pLgVE?7jH%=9=0U>AMcTN;eYOW@Q&Z%&6`E zed(cw`Eln=`LO$ocgugyeO8zk_hp^@WX==a{PQ(B{oUR(%F3IX_6c!b0A_RsPgg&e IbxsLQ0Nc1IRR910 diff --git a/res/drawable-xxhdpi/transfer_controls_background.9.png b/res/drawable-xxhdpi/transfer_controls_background.9.png index cdbc966d88dd808313cdaf3ad6db093500d2a433..0fa81940ce8f43ab4b46461c74ecef28ffe484e1 100644 GIT binary patch literal 3104 zcmV+*4BzvKP)0hKk}0Gc$8w>AejzRt2WU z4w)mp>V3N!mPOrtTRQ(&%ym9N-+ND=tBO8JC6P$Fk3=GoNF)-8BwilvS2NfgN~0pX zR*ol{z+8zctJ(ooTseV>D#u55rBUY4n!(Y2@p2{6AOt3%D;tBTgT+g3k1vYRK zTBr-jY@sf+a1%CQ1%Jx*_VKV(NEEsm!yL$C>6i9}cmW%bbcGFgfiI$8@>p}AGDKkk zu@8U!#uPj={oJ0hv#r3_79K9Tcjv7d(l343aikJE+jpr3(Z)Cr+B|HeMDg{ zDWg&NJ>QMxNFeDmYpLG;6OB@3qA1k%)&`#FH!iD3HOFY7hyS)+OwQ4h86BD3cnizf58+iMFPn{kib$*MO+z5 z6gr_OUf1BKGl!p5e%-1rafRXDb_7$g70JM|4b!-COrH`}NKvlGS|kI{Iy6|-C8sdf z7dK)fx{xdiy08&9#`>0sLPsChVGfc-$6V|m?N|H?4X(uue1l|B@(sBn; zG)x=sAc17blfc^%TNwdU7%#UD!9vlOVi6w_FAtPLJ_?&f-1pebM+HV94WP5JL!|u> zYN2yzKmZhu8^pJvO@#d zSz0KJm($@nzQ7`Er^Dmrek(MrL$FC?*}}qz?W4lTFYuN~$eXuO z;giB>KW;3*UW}07#%Mo36o&Z90_}zh9ekAvd9IN6pfytb0`}PK>9NAf;f3u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xxxhdpi/transfer_controls_background.9.png b/res/drawable-xxxhdpi/transfer_controls_background.9.png index 4aad138cfd53822481adfb1e480f88d196e729d4..e349e740583ed427e05606ca6cb158f0936b7e70 100644 GIT binary patch literal 3110 zcmXX|dpy+J7S~ZHei(}Jeq=hgVn*g6uRJosF(e~RqmUodxaE-{@`!`+Gv1U&M3^QT z`JMV1sYvJ4Oc*t|N19J@QwYb!$>Zcv>fB%Vo@nVq_m0fZK!NUEicY_epOOZoA*BG7MQ$g{>_#mSV24z*=Lc9b{Eq2569-HEFI z)ZY3d`M2>KAT!>y9mjJ+4^}gaqakA~&x1rm!*3zbV3JzJ3!I7#!yh5z4OP zc1|*(lb%CnXk6wru5@X~uVY@(@6v+@Ec>Tz*a1h&9Ppuis=>12=&+sp{l7~>E^7Sy zDOB^g*@V$Vyte!xTO(Sa*&r&lihc+5M|4On38B3fom}fh`!n30_3ady}otVemEGkJUglPr?6;tS`VJmG+|6F zrgdi3(cK*arcFn?)p>mHqKGZ7jb@X9#dYFr4hHXD+1K+L0>bpnBJWAh?BBJ({=yq1E&o1a^9zv{h4 zlHwe&yqCn1X;T~AL!Pz?Ls=BxYMt4lzHq1LJhKJK{7jEt(T{Y5>BM}^BVLL!H<$h& zc!@vCr#VA9X*KJZDE-cY>Lx*BQ1OXmzSJ;V_&P6IZX17BnyPvQ*&2jfiEEM;5Nii; zK0`M}6;1?pyqWlE%oMVn*M+O~swfEUw>-rRd~nrKJT&y+60KKqooj9G^XAIT9y-%k zXw;UINcs5(kW|=H)+UdTTe>mj69z1+kA!8wRQI`kCOnBjIv;}^mvq^1cqV^~M&Waj zc~rHVLWf9TQ1alu(IW`*V0+N6;E;Ocfo>2x_(U0!Y%TU}zpezf7zRzjy(vsMOe<(g zU5x7iTWU73s%#!F)#P?Xuk3sdf06ft%yWZk9{<06(}$G4Fz-FJILH zvBymAM@k?qDXjqH0G3wO<)O?vuZB}^y)6hBp&7s8<&5u6f;Fuz(ITg7bFEhcdw^oT zj*J%321aWx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8#|V) zE4tx^01gocm8@zfa1>@Iti%=V1u%XNI%cb%8nTr%GM>H7Oe*}fl z@bljXm#yC{LWdH6(G3zj25AxTS*lpmUEQ@sD@I|p8ltIn=Of{E3FBqxg_e?6L5ouvXO1T*_BgB>KMxb(w44 zHbu!t3u$r>Kaj}T0Do~b?bawBWH%Dx#?|ruj4M$MIn}zifd^nm`2J+_&xHtEk4EFz zDD;F&+=0wram0`J)LB6dVd8B-=k?!D-2MQFpCL`#w1BPNTAwz8V72$j2)qbqWhG1^ zl%5I6{#5^{?D6t8vG6ag`LX&}%IXF`x^KGA1)?;+sAkYa4L;;Kau5trbLV}*-&?8#v7USs9DtH>vpDI=W_gp#kv z&|DYzMdv-i3oP`MqB- zFL;CoE&S~j$*f`{z<5d-Hs7?0*A}Na`Fw+>w$YP-9wkiM%O5aw{iA?s&OptC2`mTa z^>k+>r`OFJTm5`SoZFkcSMzE5DLDy9ApS(PSB76*T~X-sM-hCOy?^IgwmZJ|q8$}* zEbk-YmUbgx%1`fBJ1Zc%jD4;cwL(v+A#M!HwOvk9 zknpcxdSYx;c%7n8@b8>CZ1(gllXewIWnynSQ^b#HH-NfOmm}4GhVC(h2_2jdJQ-|; zO%gi4RC%3w#6EqRHVh2kg?7(T)KhsW+}q=iKOM1?M`%>bU~u}9L3MS(;0Qqo%-kPb zNY&$7LG3INhQ(LfA1<8LtmsK`2(M*&#%D<}U=S>`f77WD9jR5pl^Cd6k2T@Ucxp2A zA$OKwkr&;j>CL(xyCBwa^9<*U>%*^n>IfuL$|V4a&0Yp v@2kjw<^9b8X+Fuk)cs(-U7CB6cG9|P3aalYasI*dzyGkS6V|cD!7t@MyZ+Hi diff --git a/src/org/thoughtcrime/securesms/components/AnimatingToggle.java b/src/org/thoughtcrime/securesms/components/AnimatingToggle.java index 30b100b89a..293e07fd31 100644 --- a/src/org/thoughtcrime/securesms/components/AnimatingToggle.java +++ b/src/org/thoughtcrime/securesms/components/AnimatingToggle.java @@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.components; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; @@ -32,6 +33,8 @@ public class AnimatingToggle extends FrameLayout { super(context, attrs, defStyleAttr); this.outAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.animation_toggle_out); this.inAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.animation_toggle_in); + this.outAnimation.setInterpolator(new FastOutSlowInInterpolator()); + this.inAnimation.setInterpolator(new FastOutSlowInInterpolator()); } @Override diff --git a/src/org/thoughtcrime/securesms/components/TransferControlView.java b/src/org/thoughtcrime/securesms/components/TransferControlView.java index 282a7ae6aa..19721b1e94 100644 --- a/src/org/thoughtcrime/securesms/components/TransferControlView.java +++ b/src/org/thoughtcrime/securesms/components/TransferControlView.java @@ -1,14 +1,17 @@ package org.thoughtcrime.securesms.components; import android.content.Context; +import android.graphics.PorterDuff.Mode; +import android.graphics.drawable.Drawable; +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v4.content.ContextCompat; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; -import android.view.animation.AlphaAnimation; -import android.view.animation.Animation; import android.widget.FrameLayout; import android.widget.TextView; @@ -34,8 +37,6 @@ public class TransferControlView extends FrameLayout { private final ProgressWheel progressWheel; private final TextView downloadDetails; - private final Animation inAnimation; - private final Animation outAnimation; private final int contractedWidth; private final int expandedWidth; @@ -50,18 +51,18 @@ public class TransferControlView extends FrameLayout { public TransferControlView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); inflate(context, R.layout.transfer_controls_view, this); - setBackgroundResource(R.drawable.transfer_controls_background); + + final Drawable background = ContextCompat.getDrawable(context, R.drawable.transfer_controls_background); + if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) { + background.setColorFilter(0x66ffffff, Mode.MULTIPLY); + } + ViewUtil.setBackground(this, background); setVisibility(GONE); + this.progressWheel = ViewUtil.findById(this, R.id.progress_wheel); this.downloadDetails = ViewUtil.findById(this, R.id.download_details); this.contractedWidth = getResources().getDimensionPixelSize(R.dimen.transfer_controls_contracted_width); this.expandedWidth = getResources().getDimensionPixelSize(R.dimen.transfer_controls_expanded_width); - this.outAnimation = new AlphaAnimation(1f, 0f); - this.inAnimation = new AlphaAnimation(0f, 1f); - this.outAnimation.setInterpolator(new FastOutSlowInInterpolator()); - this.inAnimation.setInterpolator(new FastOutSlowInInterpolator()); - this.outAnimation.setDuration(TRANSITION_MS); - this.inAnimation.setDuration(TRANSITION_MS); } @Override protected void onAttachedToWindow() { @@ -115,16 +116,16 @@ public class TransferControlView extends FrameLayout { layoutParams.width = targetWidth; setLayoutParams(layoutParams); } else { - ViewUtil.animateOut(current, outAnimation); + ViewUtil.fadeOut(current, TRANSITION_MS); Animator anim = getWidthAnimator(sourceWidth, targetWidth); anim.start(); } if (view == null) { - ViewUtil.animateOut(this, outAnimation); + ViewUtil.fadeOut(this, TRANSITION_MS); } else { - ViewUtil.animateIn(this, inAnimation); - ViewUtil.animateIn(view, inAnimation); + ViewUtil.fadeIn(this, TRANSITION_MS); + ViewUtil.fadeIn(view, TRANSITION_MS); } current = view; diff --git a/src/org/thoughtcrime/securesms/util/ResUtil.java b/src/org/thoughtcrime/securesms/util/ResUtil.java index 0984f10819..7cd6ea8ca2 100644 --- a/src/org/thoughtcrime/securesms/util/ResUtil.java +++ b/src/org/thoughtcrime/securesms/util/ResUtil.java @@ -21,8 +21,12 @@ import android.content.Context; import android.content.res.Resources.Theme; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; import android.support.annotation.ArrayRes; import android.support.annotation.AttrRes; +import android.support.annotation.DrawableRes; +import android.support.v4.content.ContextCompat; import android.util.TypedValue; public class ResUtil { @@ -45,7 +49,7 @@ public class ResUtil { } public static Drawable getDrawable(Context c, @AttrRes int attr) { - return c.getResources().getDrawable(getDrawableRes(c, attr), c.getTheme()); + return ContextCompat.getDrawable(c, getDrawableRes(c, attr)); } public static int[] getResourceIds(Context c, @ArrayRes int array) { diff --git a/src/org/thoughtcrime/securesms/util/ViewUtil.java b/src/org/thoughtcrime/securesms/util/ViewUtil.java index 130ec2b7ff..849c76d8db 100644 --- a/src/org/thoughtcrime/securesms/util/ViewUtil.java +++ b/src/org/thoughtcrime/securesms/util/ViewUtil.java @@ -17,35 +17,29 @@ package org.thoughtcrime.securesms.util; import android.graphics.drawable.Drawable; -import android.support.annotation.DrawableRes; +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; import android.support.annotation.IdRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.text.TextUtils; import android.text.TextUtils.TruncateAt; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; +import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.widget.TextView; public class ViewUtil { - public static void setBackgroundSavingPadding(View v, Drawable drawable) { - final int paddingBottom = v.getPaddingBottom(); - final int paddingLeft = v.getPaddingLeft(); - final int paddingRight = v.getPaddingRight(); - final int paddingTop = v.getPaddingTop(); - v.setBackgroundDrawable(drawable); - v.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom); - } - - public static void setBackgroundSavingPadding(View v, @DrawableRes int resId) { - final int paddingBottom = v.getPaddingBottom(); - final int paddingLeft = v.getPaddingLeft(); - final int paddingRight = v.getPaddingRight(); - final int paddingTop = v.getPaddingTop(); - v.setBackgroundResource(resId); - v.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom); + @SuppressWarnings("deprecation") + public static void setBackground(final @NonNull View v, final @Nullable Drawable drawable) { + if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) { + v.setBackground(drawable); + } else { + v.setBackgroundDrawable(drawable); + } } public static void swapChildInPlace(ViewGroup parent, View toRemove, View toAdd, int defaultIndex) { @@ -75,10 +69,27 @@ public class ViewUtil { return (T) parent.findViewById(resId); } + private static Animation getAlphaAnimation(float from, float to, int duration) { + final Animation anim = new AlphaAnimation(from, to); + anim.setInterpolator(new FastOutSlowInInterpolator()); + anim.setDuration(duration); + return anim; + } + + public static void fadeIn(final @NonNull View view, final int duration) { + animateIn(view, getAlphaAnimation(0f, 1f, duration)); + } + + public static void fadeOut(final @NonNull View view, final int duration) { + animateOut(view, getAlphaAnimation(1f, 0f, duration)); + } + public static void animateOut(final @NonNull View view, final @NonNull Animation animation) { if (view.getVisibility() == View.GONE) return; view.clearAnimation(); + animation.reset(); + animation.setStartTime(0); animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) {} @Override public void onAnimationRepeat(Animation animation) {} @@ -92,7 +103,10 @@ public class ViewUtil { public static void animateIn(final @NonNull View view, final @NonNull Animation animation) { if (view.getVisibility() == View.VISIBLE) return; + view.clearAnimation(); + animation.reset(); + animation.setStartTime(0); view.setVisibility(View.VISIBLE); view.startAnimation(animation); }