I think this is it

This commit is contained in:
Philipp Heckel 2025-11-17 17:15:41 -05:00
parent 9f21ea33f5
commit a6a5c26ac8
2 changed files with 18 additions and 0 deletions

View file

@ -18,6 +18,7 @@ import android.widget.Toast
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.view.ActionMode
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.ItemTouchHelper
@ -128,6 +129,22 @@ class DetailActivity : AppCompatActivity(), NotificationFragment.NotificationSet
))
setSupportActionBar(toolbarLayout.findViewById(R.id.toolbar))
// Set detail activity background: use theme background for dynamic colors, static gray for non-dynamic
val detailContentLayout = findViewById<View>(R.id.detail_content_layout)
if (repository.getDynamicColorsEnabled()) {
detailContentLayout.setBackgroundColor(
com.google.android.material.color.MaterialColors.getColor(
this,
android.R.attr.colorBackground,
ContextCompat.getColor(this, R.color.detail_activity_background)
)
)
} else {
detailContentLayout.setBackgroundColor(
ContextCompat.getColor(this, R.color.detail_activity_background)
)
}
// Show 'Back' button
supportActionBar?.setDisplayHomeAsUpEnabled(true)

View file

@ -15,6 +15,7 @@
android:layout_height="wrap_content" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/detail_content_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="16dp"