Leanback: formatting

This commit is contained in:
Felix 2020-04-10 01:13:01 +02:00
parent f68de9edd7
commit a6256641e4
3 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ import de.nicidienase.chaosflix.leanback.events.EventsActivity
import de.nicidienase.chaosflix.leanback.events.EventsActivity.Companion.start import de.nicidienase.chaosflix.leanback.events.EventsActivity.Companion.start
import de.nicidienase.chaosflix.leanback.settings.ChaosflixSettingsActivity import de.nicidienase.chaosflix.leanback.settings.ChaosflixSettingsActivity
class ItemViewClickedListener(private val fragment: Fragment, private val streamUpdater: (()->Unit)? = null) : OnItemViewClickedListener { class ItemViewClickedListener(private val fragment: Fragment, private val streamUpdater: (() -> Unit)? = null) : OnItemViewClickedListener {
override fun onItemClicked(itemViewHolder: Presenter.ViewHolder, item: Any, rowViewHolder: RowPresenter.ViewHolder?, row: Row?) { override fun onItemClicked(itemViewHolder: Presenter.ViewHolder, item: Any, rowViewHolder: RowPresenter.ViewHolder?, row: Row?) {
Log.d(TAG, "onItemClicked") Log.d(TAG, "onItemClicked")
val activity = fragment.requireActivity() val activity = fragment.requireActivity()

View file

@ -84,7 +84,7 @@ class ConferencesBrowseFragment : BrowseSupportFragment() {
rowsAdapter.add(conferencesSection) rowsAdapter.add(conferencesSection)
onItemViewClickedListener = ItemViewClickedListener(this){ onItemViewClickedListener = ItemViewClickedListener(this) {
viewModel.updateLiveStreams() viewModel.updateLiveStreams()
} }
adapter = rowsAdapter adapter = rowsAdapter

View file

@ -8,7 +8,7 @@ import androidx.leanback.widget.PlaybackControlsRow
import com.google.android.exoplayer2.ext.leanback.LeanbackPlayerAdapter import com.google.android.exoplayer2.ext.leanback.LeanbackPlayerAdapter
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
class ChaosMediaPlayerGlue(context: Context, playerAdapter: LeanbackPlayerAdapter, private val bookmarkCreator: (()->Unit)? = null) : class ChaosMediaPlayerGlue(context: Context, playerAdapter: LeanbackPlayerAdapter, private val bookmarkCreator: (() -> Unit)? = null) :
PlaybackTransportControlGlue<LeanbackPlayerAdapter>(context, playerAdapter) { PlaybackTransportControlGlue<LeanbackPlayerAdapter>(context, playerAdapter) {
private val mThumbsUpAction = PlaybackControlsRow.ThumbsUpAction(context).apply { index = PlaybackControlsRow.ThumbsUpAction.INDEX_OUTLINE } private val mThumbsUpAction = PlaybackControlsRow.ThumbsUpAction(context).apply { index = PlaybackControlsRow.ThumbsUpAction.INDEX_OUTLINE }