Skip to content

Commit

Permalink
Ensure all icons use the correct tints
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Oct 27, 2023
1 parent 8ace5f4 commit 9f8f045
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.google.common.util.concurrent.ListeningExecutorService
import com.google.common.util.concurrent.MoreExecutors
import org.joda.time.DateTime
import org.librarysimplified.audiobook.api.PlayerAudioBookType
import org.librarysimplified.audiobook.api.PlayerAudioEngineRequest
import org.librarysimplified.audiobook.api.PlayerAudioEngines
Expand Down Expand Up @@ -635,7 +636,26 @@ class ExamplePlayerActivity : AppCompatActivity(), PlayerFragmentListenerType {
}

override fun onPlayerTOCWantsBookmarks(): List<PlayerBookmark> {
return emptyList()
return listOf(
PlayerBookmark(
DateTime.now(),
PlayerPosition("Example 1", 1, 1, 0L, 0L),
100L,
null
),
PlayerBookmark(
DateTime.now(),
PlayerPosition("Example 2", 2, 1, 0L, 0L),
100L,
null
),
PlayerBookmark(
DateTime.now(),
PlayerPosition("Example 3", 3, 1, 0L, 0L),
100L,
null
)
)
}

override fun onPlayerShouldDeleteBookmark(
Expand Down
2 changes: 2 additions & 0 deletions org.librarysimplified.audiobook.views/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies {
implementation(libs.androidx.emoji2.views.helper)
implementation(libs.androidx.fragment)
implementation(libs.androidx.fragment.ktx)
implementation(libs.androidx.interpolator)
implementation(libs.androidx.lifecycle.common)
implementation(libs.androidx.lifecycle.extensions)
implementation(libs.androidx.lifecycle.livedata)
Expand All @@ -35,6 +36,7 @@ dependencies {
implementation(libs.androidx.savedstate)
implementation(libs.androidx.vectordrawable)
implementation(libs.androidx.vectordrawable.animated)
implementation(libs.androidx.viewpager)
implementation(libs.androidx.viewpager2)
implementation(libs.google.material)
implementation(libs.joda.time)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="80dp"
Expand All @@ -20,8 +21,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:tintMode="multiply"
android:contentDescription="@string/audiobook_accessibility_toc_bookmark_delete"
android:src="@drawable/ic_delete" />
android:src="@drawable/ic_delete"
app:tint="@color/PalaceTextColor" />

<LinearLayout
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="80dp"
android:layout_height="80dp">

Expand All @@ -12,8 +13,10 @@
android:layout_centerVertical="true"
android:clickable="true"
android:focusable="true"
android:tintMode="multiply"
android:src="@drawable/round_arrow"
android:visibility="visible" />
android:visibility="visible"
app:tint="@color/PalaceTextColor" />

<ImageView
android:id="@+id/player_toc_item_download_failed_error_icon"
Expand All @@ -24,6 +27,8 @@
android:layout_toLeftOf="@id/player_toc_item_download_failed_refresh"
android:clickable="false"
android:focusable="false"
android:tintMode="multiply"
android:tint="@color/PalaceTextColor"
android:src="@drawable/baseline_error_24"
android:visibility="visible" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="80dp"
android:layout_height="80dp">

Expand All @@ -12,7 +13,9 @@
android:layout_centerVertical="true"
android:clickable="true"
android:focusable="true"
android:tintMode="multiply"
android:src="@drawable/round_replay_24"
android:visibility="visible" />
android:visibility="visible"
app:tint="@color/PalaceTextColor" />

</RelativeLayout>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="80dp"
android:layout_height="80dp">

Expand All @@ -13,7 +14,9 @@
android:clickable="true"
android:focusable="true"
android:src="@drawable/round_replay_24"
android:visibility="visible" />
android:tintMode="multiply"
android:visibility="visible"
app:tint="@color/PalaceTextColor" />

<org.librarysimplified.audiobook.views.PlayerCircularProgressView
android:id="@+id/player_toc_item_not_downloaded_streamable_progress"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="80dp"
Expand All @@ -15,7 +16,9 @@
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no"
android:src="@drawable/circle" />
android:tintMode="multiply"
android:src="@drawable/circle"
app:tint="@color/PalaceTextColor" />

<TextView
android:id="@+id/player_toc_chapter_item_view_title"
Expand Down

0 comments on commit 9f8f045

Please sign in to comment.