Use vector drawables instead of PNGs for material icons#3271
Use vector drawables instead of PNGs for material icons#3271TobiGr merged 16 commits intoTeamNewPipe:devfrom
Conversation
app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
Outdated
Show resolved
Hide resolved
07efdea to
7b91ba1
Compare
|
Oh, no, it crashed when I tried to fast forward with double-tapping. While in fullscreen. |
|
@Anotherlife fixed with the latest commit, could you test this new apk? app-debug_1.zip |
|
Seems good now :D |
|
Wait, there is no icon to maximise a popup window! The control is there and it works but there is no icon visible. |
|
I fixed it in the last commit, but didn't upload a new apk due to connection problems 😅 |
|
Here it is: app-debug_2.zip |
4bd8822 to
1c03741
Compare
|
@Stypox: We don't want to add anything new to the v0.19.3 milestone. I think you should add it to the v0.20.0 milestone. |
|
I just rebased |
1aef2f7 to
9d338d0
Compare
|
@Anotherlife @domiuns @mqus @jojoxl01 @ask6155 @skil3z could you test this apk on your Android 4.4 devices? In particular you sould verify if all icons are visible. Thank you in advance :-) |
|
Looks good to me, I didn't see any icons missing. Unless I didn't see them because they were missing ... badum tisshhh |
|
Ah. just saw one thing: Please undo the icon change in the navigation drawer. According to material.io a:small_red_triangle_down: should be used and not a |
|
Oh sorry, didn't notice that. I replaced the expand icon with a drop one in the latest commit: |
For all manually-created images PNG have been kept. - rename all icon attrs to have a `ic_` prefix - always use `_24dp` icons, because there is no real difference, since they are vector drawables - always use the original name found on material.io for icon drawables, as to not create confusion and possibly duplicates. Icon names can still be different from real drawable names, though I have made some of them compliant to this or maybe more meaningul. - remove duplicate `getIconByAttr()` in ThemeHelper (use `resolveResourceIdFromAttr()` - use standard icons for `expand_more` and `expand_less` instead of triangles - use `play_button_outline` instead of custom PNG as play button in VideoDetailFragment (questionable, as there is no shadow anymore)
To fix crashes on API 19
The other icons used in notifications are taken from exoplayer's ones: `@drawable/exo_controls_*`
Also remove legacy libraries Use `androidx.preference:preference` instead of `androidx.legacy:legacy-preference-v14` and remove `androidx.legacy:legacy-support-v4
Also use `setBackgroundResource` to automatically obtain PNG drawables (from exoplayer)
Also replace all tabs with 4 spaces
As per the material guidelines
|
At present, no problems have been found and everything is normal. Thank you!
…------------------------------
在 2020年5月21日星期四,Stypox <notifications@github.com> 写道:
Oh sorry, didn't notice that. I replaced the expand icon with a drop one
in the latest commit:
app-debug_1.zip
<https://github.com/TeamNewPipe/NewPipe/files/4660987/app-debug_1.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3271 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHZ5MWIQS5IIC3ORM3OFBMLRSTHZHANCNFSM4LTRDG3Q>
.
|
What is it?
Long description of the changes in your PR
For all manually-created images PNG have been kept. Debug apk size decreased by 232,030 bytes.
ic_prefix_24dpicons, because there is no real difference, since they are vector drawablesexpand_moreandexpand_lessinstead of trianglesplay_button_outlineinstead of custom PNG as play button in VideoDetailFragment (questionable, as there is no shadow anymore)ic_search_add)ic_closeandic_replayas PNGs: needed for notifications in RemoteViewsOther changes:
getIconByAttr()in ThemeHelper (useresolveResourceIdFromAttr()instead)1.1.0to fix icon crashes in preferences on API 19: useandroidx.preference:preferenceinstead ofandroidx.legacy:legacy-preference-v14androidx.legacy:legacy-support-v4): this made no effect, and allowed me not to useandroidx.appcompat.widget.*everywhere, tested on various Android versionsSelectChannelFragmentandSelectKioskFragment(those used to set main screen tabs): in API 19 they had a duplicate title always empty.Fixes the following issue(s)
Testing apk
Tested thoroughly on API 19 (Galaxy Nexus (small screen) and Pixel 3 XL (big screen) emulators on Android 4.4), on API 24 (native on Huawei P9 Lite with Android 7.0), on API 29 (Pixel 3 XL emulator on Android 10). Though I'm not entirely sure I have explored every single piece of the app, so I'd like @domiuns and @Anotherlife to test it, too, on Android 4.4 ;-)
Debug apk: app-debug_2.zip
Agreement