Commit f5e3b281 authored by Geoffrey Métais's avatar Geoffrey Métais

Refactor Audioplayer

parent 7283a445
......@@ -3,7 +3,7 @@
<item android:id="@android:id/background">
<shape>
<solid android:color="@color/grey400transparent" />
<solid android:color="?attr/progress_background" />
</shape>
</item>
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
<variable
name="fragment"
type="org.videolan.vlc.gui.audio.AudioPlayer" />
<variable
name="showCover"
type="boolean" />
</data>
<android.support.constraint.ConstraintLayout
android:id="@+id/content_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/background_default_darker"
android:clickable="true"
android:keyboardNavigationCluster="true"
tools:targetApi="o"
android:focusable="true">
<ImageView
android:id="@+id/backgroundView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="?attr/background_default_darker"
android:scaleType="centerCrop" />
<ProgressBar
android:id="@+id/progressBar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:focusable="false"
android:indeterminate="false"
android:maxHeight="1dip"
android:minHeight="1dip"
android:paddingLeft="0px"
android:paddingRight="0px"
android:progressDrawable="?attr/progress_mini_player" />
<LinearLayout
android:id="@+id/header"
android:layout_width="0dp"
android:layout_height="60dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar"
android:gravity="center_vertical"
android:orientation="horizontal"
android:fitsSystemWindows="true"
android:background="?attr/background_default_darker"
tools:layout_constraintRight_creator="1"
tools:layout_constraintLeft_creator="1">
<ImageView
android:id="@+id/playlist_playasaudio_off"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_weight="0"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginEnd="@dimen/half_default_margin"
android:layout_marginRight="@dimen/half_default_margin"
android:focusable="true"
android:scaleType="fitXY"
android:visibility="gone"
android:onClick="@{fragment::onResumeToVideoClick}"
android:contentDescription="@string/play_as_audio"
android:src="?attr/ic_playasaudio_off" />
<org.videolan.vlc.gui.view.HeaderMediaSwitcher
android:id="@+id/audio_media_switcher"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00000000"
android:layout_weight="1" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/playlist_search_text"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
android:focusable="true"
android:visibility="gone">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/search_hint"
android:inputType="textFilter"
android:imeOptions="actionSearch"/>
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/playlist_ab_repeat"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_weight="0"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onABRepeat}"
android:contentDescription="@string/ab_repeat"
android:src="?attr/ic_repeat" />
<ImageView
android:id="@+id/playlist_search"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_weight="0"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onSearchClick}"
android:contentDescription="@string/search"
android:src="?attr/ic_menu_search" />
<ImageView
android:id="@+id/playlist_switch"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_weight="0"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onPlaylistSwitchClick}"
android:contentDescription="@string/show_playlist"
android:src="?attr/ic_playlist_on" />
<ImageView
android:id="@+id/adv_function"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_weight="0"
android:focusable="true"
android:onClick="@{fragment::showAdvancedOptions}"
android:contentDescription="@string/advanced"
android:src="?attr/ic_audio_player_more" />
<TextView
android:id="@+id/header_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|left"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:layout_weight="0"
android:clickable="true"
android:onClick="@{fragment::onTimeLabelClick}"
android:text="@string/time_0"
android:textColor="?attr/audio_player_header_time"
android:textSize="18sp" />
<ImageView
android:id="@+id/header_play_pause"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_marginRight="@dimen/default_margin"
android:layout_marginEnd="@dimen/default_margin"
android:contentDescription="@string/play"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onPlayPauseClick}"
android:onLongClick="@{fragment::onStopClick}"
android:src="?attr/ic_pause" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/songs_list"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintWidth_percent="0.5"
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_centerHorizontal="true"
android:clipToPadding="false"
android:visibility="visible"
android:layout_gravity="center_horizontal"
android:background="?attr/background_default"
android:paddingBottom="@dimen/listview_bottom_padding" />
<org.videolan.vlc.gui.view.CoverMediaSwitcher
android:id="@+id/cover_media_switcher"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/songs_list"
app:layout_constraintBottom_toTopOf="@+id/play_pause"
android:layout_marginLeft="@dimen/audio_player_cover_margin"
android:layout_marginRight="@dimen/audio_player_cover_margin"
android:layout_marginTop="@dimen/audio_player_cover_margin"
android:visibility="visible"
tools:layout_constraintLeft_creator="1" />
<include layout="@layout/shadow_top"
android:layout_width="0dp"
android:layout_height="6dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header" />
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|start"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/timeline"
app:layout_constraintBottom_toBottomOf="@+id/timeline"
app:layout_constraintTop_toTopOf="@+id/timeline"
android:layout_marginStart="@dimen/default_margin"
android:clickable="true"
android:onClick="@{fragment::onTimeLabelClick}"
android:text="@string/time_0"
android:textSize="12sp"
android:focusable="true" />
<SeekBar
android:id="@+id/timeline"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/time"
app:layout_constraintEnd_toStartOf="@+id/length"
android:layout_marginBottom="8dp"
android:focusable="true"
android:maxHeight="1dip"
android:minHeight="1dip"
android:paddingLeft="@dimen/half_default_margin"
android:paddingRight="@dimen/half_default_margin"
android:progressDrawable="@drawable/po_seekbar"
android:splitTrack="false"
android:thumb="@drawable/seekbar_thumb" />
<TextView
android:id="@+id/length"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|end"
app:layout_constraintEnd_toStartOf="@+id/songs_list"
app:layout_constraintStart_toEndOf="@+id/timeline"
app:layout_constraintBottom_toBottomOf="@+id/timeline"
app:layout_constraintTop_toTopOf="@+id/timeline"
android:layout_marginEnd="@dimen/default_margin"
android:text="@string/time_0"
android:contentDescription="@string/length"
android:textSize="12sp" />
<ImageView
android:id="@+id/shuffle"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/previous"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:layout_constraintHorizontal_chainStyle="spread"
android:contentDescription="@string/shuffle_title"
android:focusable="true"
android:scaleType="fitXY"
android:src="?attr/ic_shuffle"
android:onClick="@{fragment::onShuffleClick}" />
<ImageView
android:id="@+id/repeat"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintEnd_toStartOf="@+id/songs_list"
app:layout_constraintStart_toEndOf="@+id/next"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
android:contentDescription="@string/repeat_title"
android:focusable="true"
android:onClick="@{fragment::onRepeatClick}"
android:scaleType="fitXY"
android:src="?attr/ic_repeat" />
<ImageView
android:id="@+id/play_pause"
android:layout_width="64dp"
android:layout_height="64dp"
app:layout_constraintBottom_toTopOf="@+id/timeline"
app:layout_constraintStart_toEndOf="@+id/previous"
app:layout_constraintEnd_toStartOf="@+id/next"
android:contentDescription="@string/play"
android:layout_marginBottom="@dimen/audioplayer_controls_margin"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onPlayPauseClick}"
android:onLongClick="@{fragment::onStopClick}"
android:src="?attr/ic_pause" />
<ImageView
android:id="@+id/next"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintStart_toEndOf="@+id/play_pause"
app:layout_constraintEnd_toStartOf="@+id/repeat"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
android:contentDescription="@string/next"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onNextClick}"
android:src="?attr/ic_next" />
<ImageView
android:id="@+id/previous"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintEnd_toStartOf="@+id/play_pause"
app:layout_constraintStart_toEndOf="@+id/shuffle"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
android:contentDescription="@string/previous"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onPreviousClick}"
android:src="?attr/ic_previous" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
......@@ -10,14 +11,15 @@
name="showCover"
type="boolean" />
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.constraint.ConstraintLayout
android:id="@+id/content_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/background_default_darker"
android:clickable="true"
android:keyboardNavigationCluster="true"
tools:targetApi="o">
tools:targetApi="o"
android:focusable="true">
<ImageView
android:id="@+id/backgroundView"
android:layout_width="0dp"
......@@ -182,10 +184,11 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/songs_list"
android:layout_width="@dimen/default_content_width"
android:layout_width="0dp"
android:layout_height="0dp"
android:maxWidth="800dp"
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintBottom_toTopOf="@+id/timeline"
app:layout_constraintBottom_toTopOf="@+id/play_pause"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_centerHorizontal="true"
......@@ -199,16 +202,15 @@
android:id="@+id/cover_media_switcher"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintBottom_toTopOf="@+id/timeline"
app:layout_constraintBottom_toTopOf="@+id/play_pause"
android:layout_marginLeft="@dimen/audio_player_cover_margin"
android:layout_marginRight="@dimen/audio_player_cover_margin"
android:layout_marginStart="@dimen/audio_player_cover_margin"
android:layout_marginEnd="@dimen/audio_player_cover_margin"
android:layout_marginTop="@dimen/default_margin"
android:layout_marginBottom="@dimen/default_margin"
android:layout_marginTop="@dimen/audio_player_cover_margin"
android:layout_marginBottom="@dimen/audio_player_cover_margin"
android:visibility="@{showCover ? View.VISIBLE : View.GONE}"
tools:layout_constraintLeft_creator="1" />
......@@ -219,35 +221,28 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header" />
<include layout="@layout/shadow_bottom"
android:layout_width="0dp"
android:layout_height="6dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="@+id/timeline" />
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|left"
android:layout_gravity="center|start"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/timeline"
app:layout_constraintBottom_toBottomOf="@+id/timeline"
app:layout_constraintBottom_toTopOf="@+id/timeline"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginLeft="@dimen/default_margin"
android:clickable="true"
android:onClick="@{fragment::onTimeLabelClick}"
android:text="@string/time_0"
android:textSize="12sp" />
android:textSize="12sp"
android:focusable="true" />
<SeekBar
android:id="@+id/timeline"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@+id/time"
app:layout_constraintEnd_toStartOf="@+id/length"
app:layout_constraintBottom_toTopOf="@+id/play_pause"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="32dp"
android:focusable="true"
android:maxHeight="1dip"
android:minHeight="1dip"
......@@ -261,11 +256,9 @@
android:id="@+id/length"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|right"
android:layout_gravity="center|end"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/timeline"
app:layout_constraintBottom_toBottomOf="@+id/timeline"
android:layout_marginRight="@dimen/default_margin"
app:layout_constraintBottom_toTopOf="@+id/timeline"
android:layout_marginEnd="@dimen/default_margin"
android:text="@string/time_0"
android:contentDescription="@string/length"
......@@ -273,13 +266,13 @@
<ImageView
android:id="@+id/shuffle"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/previous"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
app:layout_constraintHorizontal_chainStyle="spread"
android:contentDescription="@string/shuffle_title"
android:focusable="true"
android:scaleType="fitXY"
......@@ -288,12 +281,12 @@
<ImageView
android:id="@+id/repeat"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toRightOf="@+id/next"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
android:layout_marginRight="@dimen/default_margin"
android:layout_marginEnd="@dimen/default_margin"
android:contentDescription="@string/repeat_title"
android:focusable="true"
......@@ -303,12 +296,13 @@
<ImageView
android:id="@+id/play_pause"
android:layout_width="48dp"
android:layout_height="48dp"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="64dp"
android:layout_height="64dp"
app:layout_constraintBottom_toTopOf="@+id/timeline"
app:layout_constraintLeft_toRightOf="@+id/previous"
app:layout_constraintRight_toLeftOf="@+id/next"
android:contentDescription="@string/play"
android:layout_marginBottom="@dimen/audioplayer_controls_margin"
android:focusable="true"
android:scaleType="fitXY"
android:onClick="@{fragment::onPlayPauseClick}"
......@@ -317,8 +311,8 @@
<ImageView
android:id="@+id/next"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintLeft_toRightOf="@+id/play_pause"
app:layout_constraintRight_toLeftOf="@+id/repeat"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
......@@ -331,11 +325,10 @@
<ImageView
android:id="@+id/previous"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintRight_toLeftOf="@+id/play_pause"
app:layout_constraintLeft_toRightOf="@+id/shuffle"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
android:contentDescription="@string/previous"
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="info_appbar_height">300dp</dimen>
<dimen name="audioplayer_controls_margin">32dp</dimen>
<dimen name="audio_player_cover_margin">16dp</dimen>
</resources>
\ No newline at end of file
......@@ -10,7 +10,8 @@
<dimen name="overlay_margin">10dp</dimen>
<dimen name="file_picker_width">600dip</dimen>
<dimen name="audio_player_cover_margin">32dp</dimen>
<dimen name="audio_player_cover_margin">16dp</dimen>
<dimen name="audioplayer_controls_margin">16dp</dimen>
<!-- pop-Up player -->
<dimen name="video_pip_width">512dp</dimen>
......
......@@ -27,6 +27,7 @@
<attr name="list_title" format="reference|color" />
<attr name="color_menu_button" format="reference|color" />
<attr name="audio_player_background_tint" format="reference|color" />
<attr name="progress_background" format="reference|color" />
<!--Main Icons-->
<attr name="ic_down_style" format="reference" />
......
......@@ -38,6 +38,7 @@
<color name="grey50transparent">#dcfafafa</color>
<color name="grey400transparent">#80bdbdbd</color>
<color name="grey600transparent">#80757575</color>
<color name="grey900transparent">#80212121</color>
<color name="blacktransparent">#b4000000</color>
......
......@@ -14,6 +14,7 @@
<dimen name="grid_card_vertical_spacing">0dp</dimen>
<dimen name="tab_layout_horizontal_padding">5dp</dimen>
<dimen name="info_appbar_height">150dp</dimen>
<dimen name="audioplayer_controls_margin">0dp</dimen>
<!-- Video Player -->
<dimen name="overlay_padding_bottom">8dip</dimen>
......@@ -71,7 +72,7 @@
<dimen name="fastscroller_track_height">30dp</dimen>
<dimen name="fastscroller_track_width">6dp</dimen>
<dimen name="fastscroller_track_padding">5dp</dimen>
<dimen name="audio_player_cover_margin">8dp</dimen>
<dimen name="audio_player_cover_margin">4dp</dimen>
<dimen name="audio_player_elevation">16dp</dimen>
<dimen name="progress_layout_height">24dp</dimen>
<dimen name="dialog_sd_wisard_width">320dp</dimen>
......
......@@ -84,6 +84,7 @@
<item name="ic_audiodelay">@drawable/ic_audiodelay</item>
<item name="ic_subtitledelay">@drawable/ic_subtitledelay</item>
<item name="ic_passthrough">@drawable/ic_passthrough</item>
<item name="progress_background">@color/grey600transparent</item>
</style>
<style name="Theme.VLC.PickerDialog" parent="Theme.AppCompat.Dialog">
......@@ -181,6 +182,7 @@
<item name="ic_audiodelay">@drawable/ic_audiodelay_w</item>
<item name="ic_subtitledelay">@drawable/ic_subtitledelay_w</item>
<item name="ic_passthrough">@drawable/ic_passthrough_w</item>
<item name="progress_background">@color/grey400transparent</item>
</style>
<style name="Theme.VLC.TV" parent="Theme.Leanback">
<item name="colorPrimary">@color/orange800</item>
......@@ -269,6 +271,7 @@
<item name="list_subtitle">@color/grey400</item>
<item name="list_title_last">@color/list_title_last</item>
<item name="list_title">@color/bt_list_title</item>
<item name="progress_background">@color/grey400transparent</item>
</style>
<style name="VLCTransparentTheme" parent="Theme.VLC">
......
......@@ -48,7 +48,6 @@ import android.view.inputmethod.InputMethodManager
import android.widget.SeekBar
import android.widget.SeekBar.OnSeekBarChangeListener
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.channels.Channel
import kotlinx.coroutines.experimental.channels.actor
import org.videolan.medialibrary.Tools
......@@ -84,7 +83,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, PlaybackSe
private lateinit var playlistAdapter: PlaylistAdapter
private lateinit var settings: SharedPreferences
private val handler by lazy(LazyThreadSafetyMode.NONE) { Handler() }
private val updateActor = actor<Unit>(UI, capacity = Channel.CONFLATED) { for (entry in channel) doUpdate() }
private val updateActor = coroutineScope.actor<Unit>(capacity = Channel.CONFLATED) { for (entry in channel) doUpdate() }
private lateinit var helper: PlaybackServiceActivity.Helper
private var service: PlaybackService? = null
private lateinit var playlistModel: PlaylistModel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment