From 4c792e87a821e3647f4e7b9423c1288fc028d2d8 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Fri, 23 Dec 2016 09:42:52 +0800 Subject: [PATCH] fixed status actions icon size --- .../twidere/view/iface/IIconActionButton.java | 21 +++++++++++++----- .../res/drawable-hdpi/ic_action_reply.png | Bin 253 -> 0 bytes .../res/drawable-hdpi/ic_action_retweet.png | Bin 317 -> 0 bytes .../res/drawable-mdpi/ic_action_reply.png | Bin 191 -> 0 bytes .../res/drawable-mdpi/ic_action_retweet.png | Bin 243 -> 0 bytes .../res/drawable-xhdpi/ic_action_reply.png | Bin 353 -> 0 bytes .../res/drawable-xhdpi/ic_action_retweet.png | Bin 410 -> 0 bytes .../res/drawable-xxhdpi/ic_action_reply.png | Bin 399 -> 0 bytes .../res/drawable-xxhdpi/ic_action_retweet.png | Bin 413 -> 0 bytes .../src/main/res/layout/list_item_status.xml | 19 +++++++++------- twidere/src/main/res/values/styles.xml | 5 ++--- .../svg/drawable/ic_action_reply-mdpi.svg | 12 ++++++++++ .../svg/drawable/ic_action_retweet-mdpi.svg | 12 ++++++++++ 13 files changed, 52 insertions(+), 17 deletions(-) delete mode 100644 twidere/src/main/res/drawable-hdpi/ic_action_reply.png delete mode 100644 twidere/src/main/res/drawable-hdpi/ic_action_retweet.png delete mode 100644 twidere/src/main/res/drawable-mdpi/ic_action_reply.png delete mode 100644 twidere/src/main/res/drawable-mdpi/ic_action_retweet.png delete mode 100644 twidere/src/main/res/drawable-xhdpi/ic_action_reply.png delete mode 100644 twidere/src/main/res/drawable-xhdpi/ic_action_retweet.png delete mode 100644 twidere/src/main/res/drawable-xxhdpi/ic_action_reply.png delete mode 100644 twidere/src/main/res/drawable-xxhdpi/ic_action_retweet.png create mode 100644 twidere/src/main/svg/drawable/ic_action_reply-mdpi.svg create mode 100644 twidere/src/main/svg/drawable/ic_action_retweet-mdpi.svg diff --git a/twidere/src/main/java/org/mariotaku/twidere/view/iface/IIconActionButton.java b/twidere/src/main/java/org/mariotaku/twidere/view/iface/IIconActionButton.java index 721148b93..c974da0ea 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/view/iface/IIconActionButton.java +++ b/twidere/src/main/java/org/mariotaku/twidere/view/iface/IIconActionButton.java @@ -60,17 +60,26 @@ public interface IIconActionButton extends ChameleonView { public static Appearance create(Context context, AttributeSet attributeSet, Chameleon.Theme theme) { Appearance appearance = new Appearance(); ChameleonTypedArray a = ChameleonTypedArray.obtain(context, attributeSet, R.styleable.IconActionButton, theme); - appearance.setDefaultColor(a.getColor(R.styleable.IconActionButton_iabColor, theme.getColorForeground())); - appearance.setActivatedColor(a.getColor(R.styleable.IconActionButton_iabActivatedColor, theme.getColorAccent())); - appearance.setDisabledColor(a.getColor(R.styleable.IconActionButton_iabDisabledColor, theme.getTextColorSecondary())); + appearance.setDefaultColor(a.getColor(R.styleable.IconActionButton_iabColor, 0)); + appearance.setActivatedColor(a.getColor(R.styleable.IconActionButton_iabActivatedColor, 0)); + appearance.setDisabledColor(a.getColor(R.styleable.IconActionButton_iabDisabledColor, 0)); a.recycle(); return appearance; } public static void apply(IIconActionButton view, Appearance appearance) { - view.setDefaultColor(appearance.getDefaultColor()); - view.setActivatedColor(appearance.getActivatedColor()); - view.setDisabledColor(appearance.getDisabledColor()); + final int defaultColor = appearance.getDefaultColor(); + if (defaultColor != 0) { + view.setDefaultColor(defaultColor); + } + final int activatedColor = appearance.getActivatedColor(); + if (activatedColor != 0) { + view.setActivatedColor(activatedColor); + } + final int disabledColor = appearance.getDisabledColor(); + if (disabledColor != 0) { + view.setDisabledColor(disabledColor); + } } } } diff --git a/twidere/src/main/res/drawable-hdpi/ic_action_reply.png b/twidere/src/main/res/drawable-hdpi/ic_action_reply.png deleted file mode 100644 index 2046465502dc6626d95e1669a139d8d1c970dc09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DBc3jfArXh)PE+JN#M+W<#W%_wsft{1v72daoY0F`jdM6{=h_uKK4RqcZ0Wv-r=A@@5nX%0IQ$iJ zbSVSZ9IL_$^{(su?sz^{F*3ULM)RY8r`E3(2}inCO^)zrlht&UwK#pu^zyGm$2PSd zZcyGJyv|34HE!3J!YT3g*ZBD_q^JFlYfJp2&98FcewkuDOBc{T44$rjF6*2UngCU& BU*`Y- diff --git a/twidere/src/main/res/drawable-hdpi/ic_action_retweet.png b/twidere/src/main/res/drawable-hdpi/ic_action_retweet.png deleted file mode 100644 index 80b78ab644731ce816ddb2aa7274be2a91583c17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmV-D0mA-?P)7kyFAy%^z-4dtkSeZ)pnlum z5jgsoftevyTnj;Yc|5Za3W|!6oEL1n8Faj5|CdfWgMpqrSF!8j(^7HbAr}a&W8Wk4UZJsWUAs)w*6C_v{H*9-Qui1L* z|NrFy)~sv}TPEi+_*e_<`LX|J{k8hUqOFGyZ2vF(pL@c3S*Ce^wl6%>@c)1PU;YJG zI`seZdYC>Ez3~6UgID!slNNv6f1%!6;lIX}4yR4Rm+G7UTQ@kJ|F=0{!j%8%OwC3e ri_UzpfAC+%>+_1|8J4D828;~i)2{^`v1xq{bPkdg0002GNklUQ@B0CX_*@9T;612$*M6;|Alr&a0$0{&!h99O7EatoI zn{xZb|qpBUZe)J#`;o3 tW8>AL4#b5rvP%(5jSPUPn}Hb^?gtyyR4zWrpiTe)002ovPDHLkV1gY%WoiHb diff --git a/twidere/src/main/res/drawable-xhdpi/ic_action_reply.png b/twidere/src/main/res/drawable-xhdpi/ic_action_reply.png deleted file mode 100644 index 23cf88ca04ed4977e9068e46546e0bdf4b70f127..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 353 zcmV-n0iOPeP)14!G;0>tfg0mkhm0g~-C z0TS(l2l&|@fG#)G*kzq;@b(FxJaf+>QP}pgnjEtny8W~vPwbOXwEs5XlvPFhqzBft z0iZ*XwB`}S+7#8N@JL?uBF1jXX-{Fm(f@vq4H~o<&56*Z5a2Q*Pni=gsq;D$=W2n! z=-;kmauhh=ZYn^Zt>6O*8(i}?iEtqp$%xpVoWwgTqM?-9_#DneV>wxN=m2$=WQz$U z+Vt3zt!AVt@j^wr#+5nO2FS4Ib>7U(%;xz5wD3m-W06xs00000NkvXXu0mjf{Vt+I diff --git a/twidere/src/main/res/drawable-xhdpi/ic_action_retweet.png b/twidere/src/main/res/drawable-xhdpi/ic_action_retweet.png deleted file mode 100644 index 3d4bbce57d5e1fca077ac9bac8826682785a92f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 410 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I0wfs{c7`%AFeZAsIEGX(zMX#1i^)-powW?gzJV~MM?a|bT2-zPq zoj=syKiL>>cT7@ZZ+*iejV>T^auC-4+QP^`jc><++v|?&y*|?U^~>h-Gep0Yq%hjO zUn88%l>C;nx@}T}k)X8Fsbjyix3x@SDBc|IG9&Z+I_4U;6v>CuoaHS${hl&z*EzXq zNq>5(2KSBUvuvuS++pAHQ?cJNb~_{MxrhzDtj|U6vW9fdSa$A)fpM7n6&aQj`#hLU z8l)!AZU5f7YIlRu+PT-iPieY6f5GWFHv2Mn+cT?HJt;go?{dSH>S-xIpSsm?JYJi> z|8dEq2Ej{!5nAE^0 zxu$%fJ~;uuoF`1WR?;4KG%V;?6A zaH=zM76!rDz(wzF{Ddud%O-SFVATT!k4}Pp1G;idL{D%uW&vAb(JHW zoxfUwH5b?=hI6g(e{q`OE2nU*dGQNn{``=xKkzcM~} z;LK*Hr)xGnJ#&B76u#)0%*OR%QOl2>Iq<%>>iFF=t?{S3o_}TTXFJR8e!h30nOm)>gTe~DWM4fpP!$s diff --git a/twidere/src/main/res/drawable-xxhdpi/ic_action_retweet.png b/twidere/src/main/res/drawable-xxhdpi/ic_action_retweet.png deleted file mode 100644 index 87ddde1b36c88f2ec01f989fdf27bfb4779aaac5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 413 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%&M7z?kCc;uuoF`1VF%Zi|CJd!fpj zDN_SDJt8!xZs0rMc;2z_fMtfP4&T4ptfI_imdjEmdH$;XTy}HI=V}I~%l4fea1dge z{manRd~f_5^Ru&Rj8EE!Iy+ze@%O^hJuUm!>TC8CbhC=ozOe4TP_k85C}7L$jj=}+ zmM}@Yw&pm=(7mSYams0qh%eFIo;Uo?3-WKczMb>m%}0#B=U>fa^i9u-WZZo2ni12g zwsYaejDKExJDUnGu(b~B6zpkJECKE9?|0ZL@!(X3bWLixBIX=rb z=P3XG>mbAP?~9WJ-hp&C?X8n)a9v^b=BqM;xn@^_O*u2eW)atdHSZZET0(C>%{+Gh j>-v1gPy8VJv49^;KF?BkA4GWPgCsp&{an^LB{Ts5s!go+ diff --git a/twidere/src/main/res/layout/list_item_status.xml b/twidere/src/main/res/layout/list_item_status.xml index c4925f862..214359843 100644 --- a/twidere/src/main/res/layout/list_item_status.xml +++ b/twidere/src/main/res/layout/list_item_status.xml @@ -59,14 +59,14 @@ android:layout_toRightOf="@+id/statusInfoIcon" android:ellipsize="end" android:gravity="center_vertical|start" + android:maxLines="1" android:minHeight="@dimen/element_size_small" android:tag="font_family|user" android:textAppearance="?android:attr/textAppearanceSmall" android:visibility="gone" tools:text="Retweeted by Mariotaku" tools:textSize="@dimen/text_size_extra_small" - tools:visibility="visible" - android:maxLines="1"/> + tools:visibility="visible"/> + tools:text="255"/> + tools:text="255"/> @@ -449,6 +451,7 @@ android:contentDescription="@string/like" android:focusable="false" android:gravity="center" + android:padding="@dimen/element_spacing_small" android:scaleType="centerInside" android:src="@drawable/ic_action_heart" app:iabActivatedColor="@color/highlight_like" @@ -464,11 +467,11 @@ android:ellipsize="end" android:focusable="false" android:gravity="center" + android:maxLines="1" android:minHeight="@dimen/button_size_content_card_action" android:tag="font_family|user" android:textAppearance="?android:textAppearanceSmall" - tools:text="255" - android:maxLines="1"/> + tools:text="255"/> diff --git a/twidere/src/main/res/values/styles.xml b/twidere/src/main/res/values/styles.xml index 8a14fdf5c..d903f6d23 100644 --- a/twidere/src/main/res/values/styles.xml +++ b/twidere/src/main/res/values/styles.xml @@ -17,13 +17,12 @@