Skip to content

Commit

Permalink
[SearchActivity] support SlidingMusicPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
chr56 committed Nov 8, 2024
1 parent 23b9622 commit 3fa069c
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import player.phonograph.mechanism.event.MediaStoreTracker
import player.phonograph.settings.Keys
import player.phonograph.settings.Setting
import player.phonograph.ui.components.popup.OptionsPopup
import player.phonograph.ui.modules.panel.AbsMusicServiceActivity
import player.phonograph.ui.modules.panel.AbsSlidingMusicPanelActivity
import player.phonograph.util.theme.accentColor
import player.phonograph.util.theme.getTintedDrawable
import player.phonograph.util.theme.primaryColor
Expand All @@ -42,9 +42,10 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuItem
import android.view.View
import kotlinx.coroutines.launch

class SearchActivity : AbsMusicServiceActivity(), SearchView.OnQueryTextListener,
class SearchActivity : AbsSlidingMusicPanelActivity(), SearchView.OnQueryTextListener,
ICreateFileStorageAccessible, IOpenFileStorageAccessible, IOpenDirStorageAccessible {

private var viewBinding: ActivitySearchBinding? = null
Expand Down Expand Up @@ -72,8 +73,6 @@ class SearchActivity : AbsMusicServiceActivity(), SearchView.OnQueryTextListener

super.onCreate(savedInstanceState)

setContentView(binding.root)

setUpToolBar()
setUpPager()

Expand All @@ -96,6 +95,8 @@ class SearchActivity : AbsMusicServiceActivity(), SearchView.OnQueryTextListener
lifecycle.addObserver(MediaStoreListener())
}

override fun createContentView(): View = wrapSlidingMusicPanel(binding.root)

private fun setUpPager() {
val primaryColor = primaryColor()
val accentColor = accentColor()
Expand Down

0 comments on commit 3fa069c

Please sign in to comment.