From cc7a8fb1a611299bab6b574b75b602b38a23b2d9 Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Tue, 21 Jun 2022 20:22:39 +0300 Subject: [PATCH 1/9] Improve image placeholders - Show placeholders until the image is loaded because timeout can be very long and missing profile pictures and video thumbnails make app inconvenient to use - Adapt profile picture and video thumbnail placeholders to light theme - Replace profile picture and video thumbnail placeholders with vector graphics --- .../fragments/detail/VideoDetailFragment.java | 4 +- .../schabi/newpipe/util/PicassoHelper.java | 17 +++- app/src/main/res/drawable-nodpi/buddy.png | Bin 1168 -> 0 bytes .../res/drawable-nodpi/buddy_channel_item.png | Bin 1051 -> 0 bytes .../res/drawable-nodpi/dummy_thumbnail.png | Bin 956 -> 0 bytes .../drawable-nodpi/dummy_thumbnail_dark.png | Bin 105 -> 134 bytes .../dummy_thumbnail_playlist.png | Bin 1225 -> 0 bytes app/src/main/res/drawable/buddy.xml | 31 ++++++++ app/src/main/res/drawable/dummy_thumbnail.xml | 22 ++++++ .../res/drawable/dummy_thumbnail_playlist.xml | 30 +++++++ .../res/layout/list_channel_grid_item.xml | 2 +- .../res/layout/list_channel_mini_item.xml | 2 +- .../res/layout/list_comments_mini_item.xml | 2 +- .../res/layout/picker_subscription_item.xml | 2 +- app/src/main/res/values-night/colors.xml | 3 + app/src/main/res/values/colors.xml | 3 + assets/buddy_channel_item.svg | 73 ------------------ assets/dummy_thumbnail.svg | 7 ++ assets/dummy_thumbnail_playlist.svg | 8 ++ 19 files changed, 125 insertions(+), 81 deletions(-) delete mode 100644 app/src/main/res/drawable-nodpi/buddy.png delete mode 100644 app/src/main/res/drawable-nodpi/buddy_channel_item.png delete mode 100644 app/src/main/res/drawable-nodpi/dummy_thumbnail.png delete mode 100644 app/src/main/res/drawable-nodpi/dummy_thumbnail_playlist.png create mode 100644 app/src/main/res/drawable/buddy.xml create mode 100644 app/src/main/res/drawable/dummy_thumbnail.xml create mode 100644 app/src/main/res/drawable/dummy_thumbnail_playlist.xml delete mode 100644 assets/buddy_channel_item.svg create mode 100644 assets/dummy_thumbnail.svg create mode 100644 assets/dummy_thumbnail_playlist.svg diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 278d472d4..78f3772e9 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -714,7 +714,7 @@ public final class VideoDetailFragment } private void initThumbnailViews(@NonNull final StreamInfo info) { - PicassoHelper.loadThumbnail(info.getThumbnailUrl()).tag(PICASSO_VIDEO_DETAILS_TAG) + PicassoHelper.loadDetailsThumbnail(info.getThumbnailUrl()).tag(PICASSO_VIDEO_DETAILS_TAG) .into(binding.detailThumbnailImageView, new Callback() { @Override public void onSuccess() { @@ -2361,7 +2361,7 @@ public final class VideoDetailFragment binding.overlayTitleTextView.setText(isEmpty(overlayTitle) ? "" : overlayTitle); binding.overlayChannelTextView.setText(isEmpty(uploader) ? "" : uploader); binding.overlayThumbnail.setImageResource(R.drawable.dummy_thumbnail_dark); - PicassoHelper.loadThumbnail(thumbnailUrl).tag(PICASSO_VIDEO_DETAILS_TAG) + PicassoHelper.loadDetailsThumbnail(thumbnailUrl).tag(PICASSO_VIDEO_DETAILS_TAG) .into(binding.overlayThumbnail); } diff --git a/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java b/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java index aabc459d0..223e8ac9c 100644 --- a/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java @@ -104,6 +104,10 @@ public final class PicassoHelper { return loadImageDefault(url, R.drawable.dummy_thumbnail); } + public static RequestCreator loadDetailsThumbnail(final String url) { + return loadImageDefault(url, R.drawable.dummy_thumbnail, false); + } + public static RequestCreator loadBanner(final String url) { return loadImageDefault(url, R.drawable.channel_banner); } @@ -189,15 +193,24 @@ public final class PicassoHelper { private static RequestCreator loadImageDefault(final String url, final int placeholderResId) { + return loadImageDefault(url, placeholderResId, true); + } + + private static RequestCreator loadImageDefault(final String url, final int placeholderResId, + final boolean showPlaceholderWhileLoading) { if (!shouldLoadImages || isBlank(url)) { return picassoInstance .load((String) null) .placeholder(placeholderResId) // show placeholder when no image should load .error(placeholderResId); } else { - return picassoInstance + final RequestCreator requestCreator = picassoInstance .load(url) - .error(placeholderResId); // don't show placeholder while loading, only on error + .error(placeholderResId); + if (showPlaceholderWhileLoading) { + requestCreator.placeholder(placeholderResId); + } + return requestCreator; } } } diff --git a/app/src/main/res/drawable-nodpi/buddy.png b/app/src/main/res/drawable-nodpi/buddy.png deleted file mode 100644 index 8713ee02bfa8cd492bf79ed4730ca4060ceeb631..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1168 zcmV;B1aJF^P)b~j1!&(iVkGA*yRLsUHxctK)V zbrwUKLgK~AqOlZmKgKJ|YYQQFIo?ozuk3;}eY~-(u?X@o$J-OLt0fRsC3shIYX#(- zNuCL1%5yBL~_YZH(P`V$pD zqy|Nz=7uyeXe13Uq?I5_ww#bl3bN7*A4KIKEK_Wd1xQxb3@jDYkVb%~h8CjwU@E7D)L^S7h2&r>r-a;rv3o+u0E`Xk zAPrb+$RGt+E2toy1Zz?eLH1y7PXrl(xiJmoD!`n$l0ZtZSCT*`U~fzTQ3=?K6#?V~ z12qJY9SpP~fJ|VZ2?3-B1NHPn6pYkqhqN%#Njs#1k@nglYZz&x9WsTHrrIF`7-^^- z(ua{U?T{2kO0`2Ij3l)~1dJ5>0ucdX86@`ppFO<%W-wA;J7j3tN0jiPaRVc*wL|tW z(m^}q2qU%LA3lWRpvN%`H1XxgbV~qfVW4BUR(0a6bI$P>d_(L(AznCe$_5LNcT*v+jXfvEir znCq2FKcw!%K>b=XJ&yxYb}t60>+zM-w&x0SWt3!Cq&I* zNwe-fkfsM~>K)$>DFtk5^F~NFgJn&-w?NJrtSh^`9@3_;u;ln!NFBq<;`()vQozzg z`5MShz}m$2<&X`mZuwHk3YNEi8DtCV+q?vFD`0)1d>(Ru3yJzU$T5Z!#m&=@OA1Fy zFHb?b49=9RCm;nJYW{yn1*fY12RX-Zs`&IDNDjx!)juH{IM?Q1kXFFCMEf^H4d7q{ z^%vw8PPYFO(j{=RwEF|Hgrlu~hg@SgT73NtGKaG*euZ2GoK0MRfvn(g>z|NL!r^51 z1G0nDl|LYTI9>J~a)jfx-ym~1-r_4nC2+jtE94%|*L;C2;C#z3kRF_`_Zf1A2VFiv zDtJ)!2~xm==AR%p@Sy%`|M z$uorG8CUd71_tH>o-U3d6}R4;Zxmo);9%JJhx3$K|NgTH#ezx%!PgEjI8j$!K5O|Z zzLvy2;(yc}-&{ENO`)%0bIaX(=gaM!R6~nC-9PwPV)Ci;kG~avnkTi?=a=2jTl4N{ zx83>Fc`SZLVO{lFf$g#n=dZlDu5RW8EBOcZD);-Ra}@48_}^gXWceW8kKC7nDm?av z{7}t$snUMO=#NqLMCqU`n}bt=oWDu=2UgEil(xxLHhi++!=AZ&CIl^H4fW#QnYATp z-6p3wuHM%=xgr;BUAkm~*Fw`!POgnF5?&l>dGbPKx=@gGNm7=gqISuY(;O>>OQu)| zDq5Fp6BaabN>AogG;e*E$K+Hb5W&qcv*ExL`y-M927R_qIE2){P2ly&x#?`@_^8`9 zg-Iy*n*g`aG+Pzc&MCG>8e9&^Epl)=I^oA9p|5Gv|9_O;FYs6>^>zA1iRm9dwuc(C zHD=zanXpxM$-BblK7*9o({(RbU6}0qM(zE{jZVSpOW18czUVz*{WmegW?q`K#E&;8 zIozMM@LrYpw@^xI>NEM`BpI9A=8v3S9eR{`I96BZiOuzlqdMoBoK|%@RYxi+A9<^5 zwW<2Je9uCyzi!yp4gH%GgXh|nsmIJ$}Rs%;$ZVd<&qPs zt>P~&b376sblSD>L>`vk$|pWayFmy*8bpJ zDRAea_X(MUx-~5p%@2A$3j{SdK2%I$V>9Mg0=K=XbS{$IP4O z{n?Q9EWx0EHvgt=%|hblFXA#zo8%>#r^fe*&f;-Q{rKYTc1xbzcb$J8XBILuTkltv z5oR&^XcH35FX-~?gUqFvqkWdPs{=l)e{oXdf!djZXKw!r)ap6^?$Eit+B>((C@Ahr z%8CD%wr7ifRPy0|&a>oA>)UI$``IM7zB>BV)^x8?{0f`8h6Y=%9gnIuywI@r*jZu| znvoyGwTrDTQesQewD3gn&#@o>{EqW2>-&>r*LXZ_(Z|zYQa)$A*kiinPNr$lkNR(` zm;6sR%zC#cI!)?-n#K9myA;1)`|)ty({I&=+su4<5++@__3=@4bX@G?s;5ox STg?c}*bJVoelF{r5}E*aKG6LD diff --git a/app/src/main/res/drawable-nodpi/dummy_thumbnail.png b/app/src/main/res/drawable-nodpi/dummy_thumbnail.png deleted file mode 100644 index 86f454186e1f39cf9ca3ac28dd95502fdbce4655..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 956 zcmeAS@N?(olHy`uVBq!ia0y~yU|a=cf8YQT3?*&#{6LDa*vT`5;~7`oJ0;^v zbkO&@i;A40S_@}sggCW&t!Uwz8UW%7X@xkchOB7uS`olGH2}z62;_nkpmA}jU-kOz z?QT77ynJ~dP~_Fwoytz3TYq1XT)67y-s}+O@=*J%Z%?i;Mux_3 zttx%jux8czTeWX`0zzf=t(8Met1B)GE?gC5W4~Bx?de}%la}pR;k0Z=9mDFTWjn$` zFNj=Ub!z6LsL;URn2^Ojg@LhG){9#l-MR`adqqS%^n}QD{)96?Wl{-U-LH!OR=otO zRE(Y`e_)B`y3nto-Qsg60IAvE!BqKrE0CQfuM(X^i>I|_E!nISGXK@})Aa@JqL$g8 zm}h)>kQeHDc2>Ysn;nZ+MeTdl5Wos#o!Z^fmi4Rp@(R0a^3&@*dbEBXlnuRl__lyn z$kvL&a|?hT{wv|os`YerO&ch7mWLgHnG*aK9*E?oBd!%lXN&;yEws~T?4U2%!8 zGZ1W|y^5RZ-?x4t?_ckKX>j0(Z0M6x$B_N^avJup4{*IV!SU;B-T3be3%P7WzHRvT zT2`;>NC4{}%cpy^(mWcq62G*+x*om%eZ6_e{GzzjHa))zrV$y6Uoi3%n%#7VP>pe=l=;*57T*`9qKWzO`aqa+~mqO>CQ2 z)THPwm^~vpdBvu@-i2HhD|K63m`>kT3RDwn0E0NDPwL>%ybA~*haoIVPItuU|?H)Z&(<0e9y%;t!Ks7D}w%g6j_y9 zd%x&~zu$seOMqsVMa~vk_4YR(N9eKgi2-l3#XkMwT{Y!;egH2oIOXC?*T@N(n0)X> Ym3dv9k!XF~Gf=klboFyt=akR{0K-zPssI20 diff --git a/app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.png b/app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.png index 02f698918fff753ac9d5bfe6091ac8349435243b..0e73416edeb6371b992c6c150b42d46a1c22f156 100644 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaMs(j9#r85lP9 zbN@+X1@buyJR*yMny-N{YhX3vTXZ8bmyq+$OArj%q2?+^5_!$^k V7#Ru_Qn`T=44$rjF6*2UngBC(9*6({ literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^?m(=;2qYLEakt!I&(;+6**`aRLM5QNh-iK2A&*Qo$V9E1zaSW-r_2yzD4^RoyhCjTU&MyAT<3;rZUGZhj37hA-&Z3Ve?Q;Lp*yG@)pezZZRsB|P*hnYQrnlAje`Hk3S|LIAbp7KR{)xjUW9eGv}CnXjKosifj&vP{) z{F(dzylTf|5>uUyZFrlof^F{pzEkUxCV%AMNDSI2zNq~zhh%cdvoxM%iL(y|@LKVM zj8;tU@ls6AYRP4AHcj8~jpa7OykiS~Yq zIX!PnLS(|NYz7z!bj^~ zZ=+f1Q{rrYJ0Hu6Q=7bT>b}GJ{6=YkH`g|%JekfenO*pyt7mzUT|+Nz(U+W(+CO@x_M8ooTwdrYDaq@nHhE&a9MCF8Dyo_L9U1(RTviPS^Ur$ZX;p6|W zncGadSpV0}?OJ}ynuom&F)JPwd-F;Dy`G0IbQBJ(j>R>r@XP{JfC-?%^>7C`(3r<)-(T2l)gh!>>E3+i$JRmUbd(d z&UHSqL)-N>gOT2n`cUKPZ@Ls7e+b?3S0Q<$p6hKEBfb6QnRhuZ9yV*~X%@c-B)fw^ zl8=Knyfu5660>x{f0bKp6AJ4Da_vvtun-5DwxZ_gUcb8=?kYU4`lJSw`}nit+wpHN v9Drp2gTsXVUlpc1f%7!MjLuFbP0l+XkK#Ah!m diff --git a/app/src/main/res/drawable/buddy.xml b/app/src/main/res/drawable/buddy.xml new file mode 100644 index 000000000..b7d23c4b1 --- /dev/null +++ b/app/src/main/res/drawable/buddy.xml @@ -0,0 +1,31 @@ + + + + + + diff --git a/app/src/main/res/drawable/dummy_thumbnail.xml b/app/src/main/res/drawable/dummy_thumbnail.xml new file mode 100644 index 000000000..5114fda32 --- /dev/null +++ b/app/src/main/res/drawable/dummy_thumbnail.xml @@ -0,0 +1,22 @@ + + + + diff --git a/app/src/main/res/drawable/dummy_thumbnail_playlist.xml b/app/src/main/res/drawable/dummy_thumbnail_playlist.xml new file mode 100644 index 000000000..683b814c9 --- /dev/null +++ b/app/src/main/res/drawable/dummy_thumbnail_playlist.xml @@ -0,0 +1,30 @@ + + + + + diff --git a/app/src/main/res/layout/list_channel_grid_item.xml b/app/src/main/res/layout/list_channel_grid_item.xml index d9084bbe9..9f92c35a7 100644 --- a/app/src/main/res/layout/list_channel_grid_item.xml +++ b/app/src/main/res/layout/list_channel_grid_item.xml @@ -18,7 +18,7 @@ android:layout_centerHorizontal="true" android:layout_margin="2dp" android:contentDescription="@string/detail_uploader_thumbnail_view_description" - android:src="@drawable/buddy_channel_item" + android:src="@drawable/buddy" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_channel_mini_item.xml b/app/src/main/res/layout/list_channel_mini_item.xml index b66e07a12..e03f7c2fa 100644 --- a/app/src/main/res/layout/list_channel_mini_item.xml +++ b/app/src/main/res/layout/list_channel_mini_item.xml @@ -17,7 +17,7 @@ android:layout_centerVertical="true" android:layout_marginStart="3dp" android:layout_marginRight="15dp" - android:src="@drawable/buddy_channel_item" + android:src="@drawable/buddy" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_comments_mini_item.xml b/app/src/main/res/layout/list_comments_mini_item.xml index 6bd363311..ba984e0ff 100644 --- a/app/src/main/res/layout/list_comments_mini_item.xml +++ b/app/src/main/res/layout/list_comments_mini_item.xml @@ -17,7 +17,7 @@ android:layout_centerVertical="true" android:layout_marginStart="3dp" android:layout_marginRight="15dp" - android:src="@drawable/buddy_channel_item" + android:src="@drawable/buddy" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/picker_subscription_item.xml b/app/src/main/res/layout/picker_subscription_item.xml index c858ccc4e..f6e5f3587 100644 --- a/app/src/main/res/layout/picker_subscription_item.xml +++ b/app/src/main/res/layout/picker_subscription_item.xml @@ -22,7 +22,7 @@ android:layout_width="48dp" android:layout_height="48dp" app:shapeAppearance="@style/CircularImageView" - tools:src="@drawable/buddy_channel_item" /> + tools:src="@drawable/buddy" /> @color/white @color/white + + #6C6C6C + #999999 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 281fd9ce7..bbcc5d4bb 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -6,6 +6,9 @@ #CD201F + #F6F6F6 + #6E6E6E + #EEEEEE #EEEEEE diff --git a/assets/buddy_channel_item.svg b/assets/buddy_channel_item.svg deleted file mode 100644 index 4dec41f9d..000000000 --- a/assets/buddy_channel_item.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/assets/dummy_thumbnail.svg b/assets/dummy_thumbnail.svg new file mode 100644 index 000000000..bdea80b55 --- /dev/null +++ b/assets/dummy_thumbnail.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/assets/dummy_thumbnail_playlist.svg b/assets/dummy_thumbnail_playlist.svg new file mode 100644 index 000000000..bd4b190aa --- /dev/null +++ b/assets/dummy_thumbnail_playlist.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 7b41acb781a994943318adb513fd9ccc9bc0b9f0 Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Thu, 7 Jul 2022 22:56:40 +0300 Subject: [PATCH 2/9] Use corresponding material icon in user profile thumbnail --- app/src/main/res/drawable/buddy.xml | 43 +++++++++++------------------ 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/app/src/main/res/drawable/buddy.xml b/app/src/main/res/drawable/buddy.xml index b7d23c4b1..b1d8be868 100644 --- a/app/src/main/res/drawable/buddy.xml +++ b/app/src/main/res/drawable/buddy.xml @@ -1,31 +1,20 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> - - + android:pathData="M0,0 L24,0 L24,24 L0,24 z" + android:fillColor="@color/placeholder_foreground" /> + + + + + From 429f2536af73c1ac94626e5e32425e9036135bcf Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Thu, 7 Jul 2022 23:07:09 +0300 Subject: [PATCH 3/9] Optimize thumbnail placeholder drawables --- app/src/main/res/drawable/dummy_thumbnail.xml | 26 +++++--------- .../res/drawable/dummy_thumbnail_playlist.xml | 35 ++++++------------- 2 files changed, 18 insertions(+), 43 deletions(-) diff --git a/app/src/main/res/drawable/dummy_thumbnail.xml b/app/src/main/res/drawable/dummy_thumbnail.xml index 5114fda32..bfa2a59cc 100644 --- a/app/src/main/res/drawable/dummy_thumbnail.xml +++ b/app/src/main/res/drawable/dummy_thumbnail.xml @@ -1,22 +1,12 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:pathData="M0,0h24v24h-24z" + android:fillColor="@color/placeholder_background" /> + android:pathData="M15,11.9023L12.2188,13.3828L9.0898,15L9.0273,12.1641L9,9L11.8477,10.3555ZM15,11.9023" + android:fillColor="@color/placeholder_foreground" /> diff --git a/app/src/main/res/drawable/dummy_thumbnail_playlist.xml b/app/src/main/res/drawable/dummy_thumbnail_playlist.xml index 683b814c9..2e74c16e2 100644 --- a/app/src/main/res/drawable/dummy_thumbnail_playlist.xml +++ b/app/src/main/res/drawable/dummy_thumbnail_playlist.xml @@ -1,30 +1,15 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:pathData="M0,0h24v24h-24z" + android:fillColor="@color/placeholder_background" /> + android:pathData="M13.8008,11.9023L11.0156,13.3828L7.8906,15L7.8281,12.1641L7.8008,9L10.6484,10.3555ZM13.8008,11.9023" + android:fillColor="@color/placeholder_foreground" /> + android:pathData="M16.8008,11.9023L14.0156,13.3828L10.8906,15L10.8281,12.1641L10.8008,9L13.6484,10.3555ZM16.8008,11.9023" + android:fillColor="@color/placeholder_foreground" /> From 35eeccd45a374caf3de21e90fd874151cb7f5cfe Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Wed, 13 Jul 2022 23:13:17 +0300 Subject: [PATCH 4/9] Rename buddy.xml to dummy_person.xml --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 3 ++- app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java | 2 +- app/src/main/res/drawable/{buddy.xml => dummy_person.xml} | 0 app/src/main/res/layout-large-land/fragment_video_detail.xml | 4 ++-- app/src/main/res/layout/channel_header.xml | 4 ++-- app/src/main/res/layout/fragment_video_detail.xml | 4 ++-- app/src/main/res/layout/list_channel_grid_item.xml | 2 +- app/src/main/res/layout/list_channel_item.xml | 2 +- app/src/main/res/layout/list_channel_mini_item.xml | 2 +- app/src/main/res/layout/list_comments_item.xml | 2 +- app/src/main/res/layout/list_comments_mini_item.xml | 2 +- app/src/main/res/layout/picker_subscription_item.xml | 2 +- app/src/main/res/layout/playlist_header.xml | 2 +- app/src/main/res/layout/select_channel_item.xml | 2 +- 14 files changed, 17 insertions(+), 16 deletions(-) rename app/src/main/res/drawable/{buddy.xml => dummy_person.xml} (100%) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 78f3772e9..56e8f6d92 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1551,7 +1551,8 @@ public final class VideoDetailFragment binding.detailUploaderThumbnailView.setVisibility(View.GONE); } - final Drawable buddyDrawable = AppCompatResources.getDrawable(activity, R.drawable.buddy); + final Drawable buddyDrawable + = AppCompatResources.getDrawable(activity, R.drawable.dummy_person); binding.detailSubChannelThumbnailView.setImageDrawable(buddyDrawable); binding.detailUploaderThumbnailView.setImageDrawable(buddyDrawable); diff --git a/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java b/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java index 223e8ac9c..04135702b 100644 --- a/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/PicassoHelper.java @@ -97,7 +97,7 @@ public final class PicassoHelper { public static RequestCreator loadAvatar(final String url) { - return loadImageDefault(url, R.drawable.buddy); + return loadImageDefault(url, R.drawable.dummy_person); } public static RequestCreator loadThumbnail(final String url) { diff --git a/app/src/main/res/drawable/buddy.xml b/app/src/main/res/drawable/dummy_person.xml similarity index 100% rename from app/src/main/res/drawable/buddy.xml rename to app/src/main/res/drawable/dummy_person.xml diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index d8e52b354..1fecf93a5 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -271,7 +271,7 @@ android:layout_width="@dimen/video_item_detail_uploader_image_size" android:layout_height="@dimen/video_item_detail_uploader_image_size" android:contentDescription="@string/detail_uploader_thumbnail_view_description" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" /> diff --git a/app/src/main/res/layout/channel_header.xml b/app/src/main/res/layout/channel_header.xml index 3365e66e2..c2a70af02 100644 --- a/app/src/main/res/layout/channel_header.xml +++ b/app/src/main/res/layout/channel_header.xml @@ -33,7 +33,7 @@ android:layout_width="@dimen/channel_avatar_size" android:layout_height="@dimen/channel_avatar_size" android:padding="1dp" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" app:strokeColor="#ffffff" app:strokeWidth="2dp" /> @@ -44,7 +44,7 @@ android:layout_height="@dimen/sub_channel_avatar_size" android:layout_gravity="bottom|right" android:padding="1dp" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" android:visibility="gone" app:shapeAppearance="@style/CircularImageView" app:strokeColor="#ffffff" diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 18655283e..49b6a807c 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -258,7 +258,7 @@ android:layout_width="@dimen/video_item_detail_uploader_image_size" android:layout_height="@dimen/video_item_detail_uploader_image_size" android:contentDescription="@string/detail_uploader_thumbnail_view_description" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" /> diff --git a/app/src/main/res/layout/list_channel_item.xml b/app/src/main/res/layout/list_channel_item.xml index c09c17ead..67bdac5f7 100644 --- a/app/src/main/res/layout/list_channel_item.xml +++ b/app/src/main/res/layout/list_channel_item.xml @@ -64,7 +64,7 @@ android:layout_height="@dimen/video_item_search_avatar_image_height" android:layout_marginLeft="@dimen/video_item_search_avatar_left_margin" android:layout_marginRight="@dimen/video_item_search_avatar_right_margin" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/itemTitleView" app:layout_constraintHorizontal_bias="0.5" diff --git a/app/src/main/res/layout/list_channel_mini_item.xml b/app/src/main/res/layout/list_channel_mini_item.xml index e03f7c2fa..747d22f52 100644 --- a/app/src/main/res/layout/list_channel_mini_item.xml +++ b/app/src/main/res/layout/list_channel_mini_item.xml @@ -17,7 +17,7 @@ android:layout_centerVertical="true" android:layout_marginStart="3dp" android:layout_marginRight="15dp" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_comments_item.xml b/app/src/main/res/layout/list_comments_item.xml index 4358c438f..7cd7e066f 100644 --- a/app/src/main/res/layout/list_comments_item.xml +++ b/app/src/main/res/layout/list_comments_item.xml @@ -20,7 +20,7 @@ android:layout_marginLeft="3dp" android:layout_marginRight="@dimen/comment_item_avatar_right_margin" android:focusable="false" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_comments_mini_item.xml b/app/src/main/res/layout/list_comments_mini_item.xml index ba984e0ff..e000b55c1 100644 --- a/app/src/main/res/layout/list_comments_mini_item.xml +++ b/app/src/main/res/layout/list_comments_mini_item.xml @@ -17,7 +17,7 @@ android:layout_centerVertical="true" android:layout_marginStart="3dp" android:layout_marginRight="15dp" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/picker_subscription_item.xml b/app/src/main/res/layout/picker_subscription_item.xml index f6e5f3587..237ed107a 100644 --- a/app/src/main/res/layout/picker_subscription_item.xml +++ b/app/src/main/res/layout/picker_subscription_item.xml @@ -22,7 +22,7 @@ android:layout_width="48dp" android:layout_height="48dp" app:shapeAppearance="@style/CircularImageView" - tools:src="@drawable/buddy" /> + tools:src="@drawable/dummy_person" /> diff --git a/app/src/main/res/layout/select_channel_item.xml b/app/src/main/res/layout/select_channel_item.xml index cfaaf2760..c77ff64fd 100644 --- a/app/src/main/res/layout/select_channel_item.xml +++ b/app/src/main/res/layout/select_channel_item.xml @@ -19,7 +19,7 @@ android:layout_alignParentTop="true" android:layout_marginStart="3dp" android:layout_marginRight="8dp" - android:src="@drawable/buddy" + android:src="@drawable/dummy_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> From dff1adb1adf7c8b82f657eab189ef49f447d23b2 Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Wed, 13 Jul 2022 23:44:21 +0300 Subject: [PATCH 5/9] Fix swapped colors in video and playlist thumbnails --- .../main/res/drawable-night/dummy_person.xml | 20 ++++++++++++++++++ .../drawable-nodpi/dummy_thumbnail_dark.bmp | Bin 0 -> 62 bytes .../drawable-nodpi/dummy_thumbnail_dark.png | Bin 134 -> 0 bytes app/src/main/res/drawable/dummy_person.xml | 4 ++-- app/src/main/res/drawable/dummy_thumbnail.xml | 4 ++-- app/src/main/res/values/colors.xml | 4 ++-- 6 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/drawable-night/dummy_person.xml create mode 100644 app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.bmp delete mode 100644 app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.png diff --git a/app/src/main/res/drawable-night/dummy_person.xml b/app/src/main/res/drawable-night/dummy_person.xml new file mode 100644 index 000000000..b1d8be868 --- /dev/null +++ b/app/src/main/res/drawable-night/dummy_person.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.bmp b/app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f16e2a2bfe14d493e27d6c0686248d9a5223c1e0 GIT binary patch literal 62 jcmZ?rwPSz)DYhX3vTXZ8bmyq+$OArj%q2?+^5_!$^k V7#Ru_Qn`T=44$rjF6*2UngBC(9*6({ diff --git a/app/src/main/res/drawable/dummy_person.xml b/app/src/main/res/drawable/dummy_person.xml index b1d8be868..2b3229e8f 100644 --- a/app/src/main/res/drawable/dummy_person.xml +++ b/app/src/main/res/drawable/dummy_person.xml @@ -6,7 +6,7 @@ + android:fillColor="@color/placeholder_background" /> + android:fillColor="@color/placeholder_foreground" /> diff --git a/app/src/main/res/drawable/dummy_thumbnail.xml b/app/src/main/res/drawable/dummy_thumbnail.xml index bfa2a59cc..6a04fc53e 100644 --- a/app/src/main/res/drawable/dummy_thumbnail.xml +++ b/app/src/main/res/drawable/dummy_thumbnail.xml @@ -5,8 +5,8 @@ android:viewportHeight="24"> + android:fillColor="@color/placeholder_foreground" /> + android:fillColor="@color/placeholder_background" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index bbcc5d4bb..25dd0fc86 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -6,8 +6,8 @@ #CD201F - #F6F6F6 - #6E6E6E + #6E6E6E + #F6F6F6 #EEEEEE From 7b9b9218dc72e9d29beb5bdd4cb08bca3545d36d Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 14 Jul 2022 10:55:26 +0200 Subject: [PATCH 6/9] Remove bottom-sheet-thumbnail placeholder, clear the image instead --- .../fragments/detail/VideoDetailFragment.java | 2 +- .../res/drawable-nodpi/dummy_thumbnail_dark.bmp | Bin 62 -> 0 bytes app/src/main/res/layout/fragment_video_detail.xml | 3 +-- 3 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.bmp diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 56e8f6d92..4e81101db 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -2361,7 +2361,7 @@ public final class VideoDetailFragment @Nullable final String thumbnailUrl) { binding.overlayTitleTextView.setText(isEmpty(overlayTitle) ? "" : overlayTitle); binding.overlayChannelTextView.setText(isEmpty(uploader) ? "" : uploader); - binding.overlayThumbnail.setImageResource(R.drawable.dummy_thumbnail_dark); + binding.overlayThumbnail.setImageDrawable(null); PicassoHelper.loadDetailsThumbnail(thumbnailUrl).tag(PICASSO_VIDEO_DETAILS_TAG) .into(binding.overlayThumbnail); } diff --git a/app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.bmp b/app/src/main/res/drawable-nodpi/dummy_thumbnail_dark.bmp deleted file mode 100644 index f16e2a2bfe14d493e27d6c0686248d9a5223c1e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 62 jcmZ?rwPSz)D + android:scaleType="fitCenter" /> Date: Thu, 14 Jul 2022 10:56:28 +0200 Subject: [PATCH 7/9] Improve placeholder thumbnail SVGs and remove theme customization Theme customization does not seem to work well with Picasso: square/picasso#1275 --- .../main/res/drawable-night/dummy_person.xml | 20 ------------------- app/src/main/res/drawable/dummy_thumbnail.xml | 6 +++--- .../res/drawable/dummy_thumbnail_playlist.xml | 4 ++-- app/src/main/res/values-night/colors.xml | 3 --- app/src/main/res/values/colors.xml | 4 ++-- 5 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 app/src/main/res/drawable-night/dummy_person.xml diff --git a/app/src/main/res/drawable-night/dummy_person.xml b/app/src/main/res/drawable-night/dummy_person.xml deleted file mode 100644 index b1d8be868..000000000 --- a/app/src/main/res/drawable-night/dummy_person.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/app/src/main/res/drawable/dummy_thumbnail.xml b/app/src/main/res/drawable/dummy_thumbnail.xml index 6a04fc53e..aa81e03c9 100644 --- a/app/src/main/res/drawable/dummy_thumbnail.xml +++ b/app/src/main/res/drawable/dummy_thumbnail.xml @@ -5,8 +5,8 @@ android:viewportHeight="24"> - + diff --git a/app/src/main/res/drawable/dummy_thumbnail_playlist.xml b/app/src/main/res/drawable/dummy_thumbnail_playlist.xml index 2e74c16e2..c56d558b8 100644 --- a/app/src/main/res/drawable/dummy_thumbnail_playlist.xml +++ b/app/src/main/res/drawable/dummy_thumbnail_playlist.xml @@ -7,9 +7,9 @@ android:pathData="M0,0h24v24h-24z" android:fillColor="@color/placeholder_background" /> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index a0a0e891b..99026e70b 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -2,7 +2,4 @@ @color/white @color/white - - #6C6C6C - #999999 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 25dd0fc86..73e8a0cb1 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -6,8 +6,8 @@ #CD201F - #6E6E6E - #F6F6F6 + #999999 + #6C6C6C #EEEEEE From 6ea85e6380f35a0123e8b64c847c0eb3b355c454 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 14 Jul 2022 10:58:48 +0200 Subject: [PATCH 8/9] Rename dummy_* and more to placeholder_* --- .../fragments/detail/VideoDetailFragment.java | 2 +- .../newpipe/local/dialog/PlaylistAppendDialog.java | 3 ++- .../local/playlist/LocalPlaylistFragment.java | 2 +- .../main/java/org/schabi/newpipe/player/Player.java | 2 +- .../java/org/schabi/newpipe/util/PicassoHelper.java | 10 +++++----- ...el_banner.png => placeholder_channel_banner.png} | Bin .../{dummy_person.xml => placeholder_person.xml} | 0 ...ylist.xml => placeholder_thumbnail_playlist.xml} | 0 ...humbnail.xml => placeholder_thumbnail_video.xml} | 0 .../res/layout-large-land/fragment_video_detail.xml | 8 ++++---- app/src/main/res/layout/channel_header.xml | 6 +++--- app/src/main/res/layout/fragment_video_detail.xml | 6 +++--- app/src/main/res/layout/item_stream_segment.xml | 2 +- app/src/main/res/layout/list_channel_grid_item.xml | 2 +- app/src/main/res/layout/list_channel_item.xml | 2 +- app/src/main/res/layout/list_channel_mini_item.xml | 2 +- app/src/main/res/layout/list_comments_item.xml | 2 +- app/src/main/res/layout/list_comments_mini_item.xml | 2 +- app/src/main/res/layout/list_playlist_grid_item.xml | 2 +- app/src/main/res/layout/list_playlist_item.xml | 2 +- app/src/main/res/layout/list_playlist_mini_item.xml | 2 +- app/src/main/res/layout/list_stream_grid_item.xml | 2 +- app/src/main/res/layout/list_stream_item.xml | 2 +- app/src/main/res/layout/list_stream_mini_item.xml | 2 +- .../res/layout/list_stream_playlist_grid_item.xml | 2 +- .../main/res/layout/list_stream_playlist_item.xml | 2 +- .../main/res/layout/picker_subscription_item.xml | 2 +- app/src/main/res/layout/play_queue_item.xml | 2 +- app/src/main/res/layout/player.xml | 2 +- app/src/main/res/layout/playlist_header.xml | 2 +- app/src/main/res/layout/select_channel_item.xml | 2 +- 31 files changed, 39 insertions(+), 38 deletions(-) rename app/src/main/res/drawable-nodpi/{channel_banner.png => placeholder_channel_banner.png} (100%) rename app/src/main/res/drawable/{dummy_person.xml => placeholder_person.xml} (100%) rename app/src/main/res/drawable/{dummy_thumbnail_playlist.xml => placeholder_thumbnail_playlist.xml} (100%) rename app/src/main/res/drawable/{dummy_thumbnail.xml => placeholder_thumbnail_video.xml} (100%) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 4e81101db..c8ae0781e 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1552,7 +1552,7 @@ public final class VideoDetailFragment } final Drawable buddyDrawable - = AppCompatResources.getDrawable(activity, R.drawable.dummy_person); + = AppCompatResources.getDrawable(activity, R.drawable.placeholder_person); binding.detailSubChannelThumbnailView.setImageDrawable(buddyDrawable); binding.detailUploaderThumbnailView.setImageDrawable(buddyDrawable); diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index a874cdd62..a97eb0c18 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -145,7 +145,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final Toast successToast = Toast.makeText(getContext(), R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); - if (playlist.thumbnailUrl.equals("drawable://" + R.drawable.dummy_thumbnail_playlist)) { + if (playlist.thumbnailUrl + .equals("drawable://" + R.drawable.placeholder_thumbnail_playlist)) { playlistDisposables.add(manager .changePlaylistThumbnail(playlist.uid, streams.get(0).getThumbnailUrl()) .observeOn(AndroidSchedulers.mainThread()) diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 4bffc0983..b4af73d08 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -613,7 +613,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment + tools:src="@drawable/placeholder_thumbnail_video" /> @@ -645,7 +645,7 @@ android:paddingLeft="@dimen/video_item_search_padding" android:paddingRight="@dimen/video_item_search_padding" android:scaleType="fitCenter" - android:src="@drawable/dummy_thumbnail" /> + android:src="@drawable/placeholder_thumbnail_video" /> @@ -44,7 +44,7 @@ android:layout_height="@dimen/sub_channel_avatar_size" android:layout_gravity="bottom|right" android:padding="1dp" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" android:visibility="gone" app:shapeAppearance="@style/CircularImageView" app:strokeColor="#ffffff" diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 137dafee2..c794c5a55 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -47,7 +47,7 @@ android:scaleType="fitCenter" tools:ignore="RtlHardcoded" tools:layout_height="200dp" - tools:src="@drawable/dummy_thumbnail" /> + tools:src="@drawable/placeholder_thumbnail_video" /> diff --git a/app/src/main/res/layout/list_channel_item.xml b/app/src/main/res/layout/list_channel_item.xml index 67bdac5f7..cf4685e50 100644 --- a/app/src/main/res/layout/list_channel_item.xml +++ b/app/src/main/res/layout/list_channel_item.xml @@ -64,7 +64,7 @@ android:layout_height="@dimen/video_item_search_avatar_image_height" android:layout_marginLeft="@dimen/video_item_search_avatar_left_margin" android:layout_marginRight="@dimen/video_item_search_avatar_right_margin" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/itemTitleView" app:layout_constraintHorizontal_bias="0.5" diff --git a/app/src/main/res/layout/list_channel_mini_item.xml b/app/src/main/res/layout/list_channel_mini_item.xml index 747d22f52..473709bbd 100644 --- a/app/src/main/res/layout/list_channel_mini_item.xml +++ b/app/src/main/res/layout/list_channel_mini_item.xml @@ -17,7 +17,7 @@ android:layout_centerVertical="true" android:layout_marginStart="3dp" android:layout_marginRight="15dp" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_comments_item.xml b/app/src/main/res/layout/list_comments_item.xml index 7cd7e066f..ad73c5ff4 100644 --- a/app/src/main/res/layout/list_comments_item.xml +++ b/app/src/main/res/layout/list_comments_item.xml @@ -20,7 +20,7 @@ android:layout_marginLeft="3dp" android:layout_marginRight="@dimen/comment_item_avatar_right_margin" android:focusable="false" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_comments_mini_item.xml b/app/src/main/res/layout/list_comments_mini_item.xml index e000b55c1..606a237c5 100644 --- a/app/src/main/res/layout/list_comments_mini_item.xml +++ b/app/src/main/res/layout/list_comments_mini_item.xml @@ -17,7 +17,7 @@ android:layout_centerVertical="true" android:layout_marginStart="3dp" android:layout_marginRight="15dp" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_playlist_grid_item.xml b/app/src/main/res/layout/list_playlist_grid_item.xml index e052e9ac0..3ab69448d 100644 --- a/app/src/main/res/layout/list_playlist_grid_item.xml +++ b/app/src/main/res/layout/list_playlist_grid_item.xml @@ -17,7 +17,7 @@ android:layout_centerHorizontal="true" android:layout_marginRight="@dimen/video_item_search_image_right_margin" android:scaleType="fitStart" - android:src="@drawable/dummy_thumbnail_playlist" + android:src="@drawable/placeholder_thumbnail_playlist" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/layout/list_stream_item.xml b/app/src/main/res/layout/list_stream_item.xml index 1117a028e..793942568 100644 --- a/app/src/main/res/layout/list_stream_item.xml +++ b/app/src/main/res/layout/list_stream_item.xml @@ -15,7 +15,7 @@ android:layout_width="@dimen/video_item_search_thumbnail_image_width" android:layout_height="@dimen/video_item_search_thumbnail_image_height" android:scaleType="fitCenter" - android:src="@drawable/dummy_thumbnail" + android:src="@drawable/placeholder_thumbnail_video" app:layout_constraintBottom_toTopOf="@+id/itemProgressView" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/list_stream_mini_item.xml b/app/src/main/res/layout/list_stream_mini_item.xml index d33c9d4ba..2eab66eaf 100644 --- a/app/src/main/res/layout/list_stream_mini_item.xml +++ b/app/src/main/res/layout/list_stream_mini_item.xml @@ -18,7 +18,7 @@ android:layout_alignParentTop="true" android:layout_marginRight="@dimen/video_item_search_image_right_margin" android:scaleType="fitCenter" - android:src="@drawable/dummy_thumbnail" + android:src="@drawable/placeholder_thumbnail_video" tools:ignore="RtlHardcoded" /> + tools:src="@drawable/placeholder_person" /> diff --git a/app/src/main/res/layout/player.xml b/app/src/main/res/layout/player.xml index b8b60b3f8..60cbcf7c4 100644 --- a/app/src/main/res/layout/player.xml +++ b/app/src/main/res/layout/player.xml @@ -397,7 +397,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="2dp" - android:src="@drawable/dummy_thumbnail" + android:src="@drawable/placeholder_thumbnail_video" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/playlist_header.xml b/app/src/main/res/layout/playlist_header.xml index 39eca2fda..9c038db3a 100644 --- a/app/src/main/res/layout/playlist_header.xml +++ b/app/src/main/res/layout/playlist_header.xml @@ -45,7 +45,7 @@ android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:padding="0.7dp" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" app:shapeAppearance="@style/CircularImageView" app:strokeColor="#ffffff" app:strokeWidth="1dp" /> diff --git a/app/src/main/res/layout/select_channel_item.xml b/app/src/main/res/layout/select_channel_item.xml index c77ff64fd..c5fd51bb8 100644 --- a/app/src/main/res/layout/select_channel_item.xml +++ b/app/src/main/res/layout/select_channel_item.xml @@ -19,7 +19,7 @@ android:layout_alignParentTop="true" android:layout_marginStart="3dp" android:layout_marginRight="8dp" - android:src="@drawable/dummy_person" + android:src="@drawable/placeholder_person" app:shapeAppearance="@style/CircularImageView" tools:ignore="RtlHardcoded" /> From 9f993e0c49f2c0cf1f48205b584096621779eece Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 14 Jul 2022 14:47:54 +0200 Subject: [PATCH 9/9] Make video and playlist placeholder thumbnails 16:9 After making the playlist and video thumbnails' scaleType fitCenter, the 24dp*24dp thumbnails would appear as a square, which would be strange, since the image view is 16:9. --- .../main/res/drawable/placeholder_thumbnail_playlist.xml | 8 ++++---- app/src/main/res/drawable/placeholder_thumbnail_video.xml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/drawable/placeholder_thumbnail_playlist.xml b/app/src/main/res/drawable/placeholder_thumbnail_playlist.xml index c56d558b8..de286d860 100644 --- a/app/src/main/res/drawable/placeholder_thumbnail_playlist.xml +++ b/app/src/main/res/drawable/placeholder_thumbnail_playlist.xml @@ -1,15 +1,15 @@ diff --git a/app/src/main/res/drawable/placeholder_thumbnail_video.xml b/app/src/main/res/drawable/placeholder_thumbnail_video.xml index aa81e03c9..0b262f923 100644 --- a/app/src/main/res/drawable/placeholder_thumbnail_video.xml +++ b/app/src/main/res/drawable/placeholder_thumbnail_video.xml @@ -1,12 +1,12 @@