Use vector drawables instead of PNGs for material icons

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)
This commit is contained in:
Stypox 2020-03-25 16:23:47 +01:00
parent b5f508b309
commit c80aba9a88
758 changed files with 1165 additions and 730 deletions

View file

@ -75,7 +75,7 @@
android:focusable="true"
android:scaleType="fitXY"
android:tint="?attr/colorAccent"
android:src="@drawable/ic_close_white_24dp"
app:srcCompat="@drawable/ic_close_white_24dp"
android:background="?android:selectableItemBackground"
tools:ignore="ContentDescription"/>
@ -108,7 +108,7 @@
android:focusable="true"
android:scaleType="fitXY"
android:tint="?attr/colorAccent"
android:src="@drawable/ic_shuffle_white_24dp"
app:srcCompat="@drawable/ic_shuffle_white_24dp"
android:background="?android:selectableItemBackground"
tools:ignore="ContentDescription,RtlHardcoded"/>
</RelativeLayout>
@ -144,7 +144,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="@drawable/player_top_controls_bg"
android:background="@drawable/player_controls_top_background"
android:gravity="top"
android:paddingTop="10dp"
android:paddingBottom="10dp"
@ -241,7 +241,7 @@
android:focusable="true"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_list_white_24dp"
app:srcCompat="@drawable/ic_list_white_24dp"
android:background="?attr/selectableItemBackground"
tools:ignore="ContentDescription,RtlHardcoded"/>
@ -255,7 +255,7 @@
android:clickable="true"
android:focusable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_expand_more_white_24dp"
app:srcCompat="@drawable/ic_expand_more_white_24dp"
android:background="?attr/selectableItemBackgroundBorderless"
tools:ignore="ContentDescription,RtlHardcoded"/>
</RelativeLayout>
@ -322,7 +322,7 @@
android:focusable="true"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_cast_white_24dp"
app:srcCompat="@drawable/ic_cast_white_24dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/play_with_kodi_title"
android:visibility="gone"
@ -342,7 +342,7 @@
android:focusable="true"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_share_white_24dp"
app:srcCompat="@drawable/ic_share_white_24dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/share"
tools:ignore="RtlHardcoded"/>
@ -359,7 +359,7 @@
android:focusable="true"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_screen_rotation_white"
app:srcCompat="@drawable/ic_screen_rotation_white_24dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/toggle_orientation"
tools:ignore="RtlHardcoded"/>
@ -375,7 +375,7 @@
android:clickable="true"
android:focusable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_fullscreen_exit_white"
app:srcCompat="@drawable/ic_fullscreen_exit_white_24dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/switch_to_popup"
tools:ignore="RtlHardcoded"/>
@ -392,7 +392,7 @@
android:focusable="true"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_headset_white_24dp"
app:srcCompat="@drawable/ic_headset_white_24dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/switch_to_background"
tools:ignore="RtlHardcoded"/>
@ -409,7 +409,7 @@
android:focusable="true"
android:padding="5dp"
android:scaleType="fitXY"
android:src="@drawable/ic_volume_off_white_24dp"
app:srcCompat="@drawable/ic_volume_off_white_24dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/switch_to_background"
tools:ignore="RtlHardcoded" />
@ -420,7 +420,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/player_controls_bg"
android:background="@drawable/player_controls_background"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="16dp"
@ -484,7 +484,7 @@
android:focusable="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:scaleType="fitXY"
android:src="@drawable/ic_pause_white"
app:srcCompat="@drawable/ic_pause_white_24dp"
tools:ignore="ContentDescription"/>
<ImageButton
@ -551,7 +551,7 @@
android:background="@drawable/background_oval_black_transparent"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_action_av_fast_rewind"
tools:src="@drawable/ic_fast_rewind_white_24dp"
tools:visibility="visible" />
</LinearLayout>
@ -604,7 +604,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_volume_up_white_72dp" />
tools:src="@drawable/ic_volume_up_white_24dp" />
</RelativeLayout>
<RelativeLayout
@ -630,7 +630,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_brightness_high_white_72dp" />
tools:src="@drawable/ic_brightness_high_white_24dp" />
</RelativeLayout>
<TextView

View file

@ -61,7 +61,7 @@
android:layout_height="64dp"
android:layout_gravity="center"
android:background="@android:color/transparent"
android:src="@drawable/new_play_arrow"
app:srcCompat="@drawable/ic_play_arrow_shadow_white_24dp"
android:visibility="invisible"
tools:ignore="ContentDescription"
tools:visibility="visible" />
@ -166,14 +166,14 @@
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingLeft="12dp"
android:paddingRight="12dp">
android:paddingStart="12dp"
tools:ignore="RtlSymmetry">
<TextView
android:id="@+id/detail_video_title_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="20dp"
android:layout_marginEnd="30dp"
android:ellipsize="end"
android:maxLines="1"
android:paddingTop="12dp"
@ -184,11 +184,12 @@
<ImageView
android:id="@+id/detail_toggle_description_view"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="center_vertical|right"
android:layout_marginLeft="5dp"
android:src="@drawable/arrow_down"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="top|end"
android:layout_marginTop="11dp"
android:layout_marginEnd="10dp"
app:srcCompat="@drawable/ic_expand_more_white_24dp"
tools:ignore="ContentDescription" />
</FrameLayout>
@ -313,6 +314,18 @@
tools:text="Uploader" />
</LinearLayout>
<!--<Button
android:id="@+id/detail_uploader_subscribe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|right"
android:layout_marginRight="12dp"
android:text="@string/rss_button_title"
android:textSize="12sp"
android:theme="@style/RedButton"
app:drawableLeftCompat="@drawable/ic_rss_feed_white_24dp"
tools:ignore="RtlHardcoded"
android:visibility="gone"/>-->
</LinearLayout>
<!-- VIEW & THUMBS -->
@ -344,7 +357,7 @@
android:layout_height="@dimen/video_item_detail_like_image_height"
android:layout_below="@id/detail_view_count_view"
android:contentDescription="@string/detail_likes_img_view_description"
android:src="?attr/thumbs_up" />
app:srcCompat="?attr/ic_thumb_up" />
<TextView
android:id="@+id/detail_thumbs_up_count_view"
@ -368,7 +381,7 @@
android:layout_marginLeft="12dp"
android:layout_toRightOf="@id/detail_thumbs_up_count_view"
android:contentDescription="@string/detail_dislikes_img_view_description"
android:src="?attr/thumbs_down"
app:srcCompat="?attr/ic_thumb_down"
tools:ignore="RtlHardcoded" />
<TextView
@ -422,7 +435,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/append_playlist"
android:drawableTop="?attr/ic_playlist_add"
app:drawableTopCompat="?attr/ic_playlist_add"
android:focusable="true"
android:gravity="center"
android:paddingTop="6dp"
@ -439,7 +452,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/play_audio"
android:drawableTop="?attr/audio"
app:drawableTopCompat="?attr/ic_headset"
android:focusable="true"
android:gravity="center"
android:paddingTop="6dp"
@ -456,7 +469,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/open_in_popup_mode"
android:drawableTop="?attr/popup"
app:drawableTopCompat="?attr/ic_popup"
android:focusable="true"
android:gravity="center"
android:paddingTop="6dp"
@ -473,7 +486,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/controls_download_desc"
android:drawableTop="?attr/download"
app:drawableTopCompat="?attr/ic_file_download"
android:focusable="true"
android:gravity="center"
android:paddingTop="6dp"