Skip to content

Commit

Permalink
android auto: fix navigation tab colors and cut text
Browse files Browse the repository at this point in the history
  • Loading branch information
haggaie committed Jul 24, 2024
1 parent 9c4384e commit c036bc6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ public Single<List<MediaItem>> onLoadChildren(@NonNull final String parentId) {
if (parentId.equals(ID_ROOT)) {
mediaItems.add(
createRootMediaItem(ID_BOOKMARKS,
playerService.getResources().getString(R.string.tab_bookmarks),
R.drawable.ic_bookmark));
playerService.getResources().getString(R.string.tab_bookmarks_short),
R.drawable.ic_bookmark_white));
mediaItems.add(
createRootMediaItem(ID_HISTORY,
playerService.getResources().getString(R.string.action_history),
R.drawable.ic_history));
R.drawable.ic_history_white));
} else if (parentId.startsWith(ID_BOOKMARKS)) {
final Uri parentIdUri = Uri.parse(parentId);
final List<String> path = parentIdUri.getPathSegments();
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_bookmark_white.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/white"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z" />
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_history_white.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/white"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" />
</vector>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<string name="show_info">Show info</string>
<string name="tab_subscriptions">Subscriptions</string>
<string name="tab_bookmarks">Bookmarked Playlists</string>
<string name="tab_bookmarks_short">Playlists</string>
<string name="tab_choose">Choose Tab</string>
<string name="controls_background_title">Background</string>
<string name="controls_popup_title">Popup</string>
Expand Down

0 comments on commit c036bc6

Please sign in to comment.