This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log | |
import com.google.android.exoplayer2.ExoPlaybackException | |
import com.google.android.exoplayer2.PlaybackParameters | |
import com.google.android.exoplayer2.Player | |
import com.google.android.exoplayer2.Timeline | |
import com.google.android.exoplayer2.source.TrackGroupArray | |
import com.google.android.exoplayer2.trackselection.TrackSelectionArray | |
private fun sample(player: Player) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostFragment : Fragment() { | |
private lateinit var bin: CompositeDisposable | |
private lateinit var vm: PostViewModel | |
private lateinit var id: String | |
private lateinit var title: TextView | |
private lateinit var body: TextView | |
private lateinit var refreshButton: Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PanelHandleViewModel { | |
// Gives us player status information | |
private lateinit var player: Player | |
// Multicasts emissions of what's currently selected for playback. | |
private lateinit var provider: PodcastProvider | |
fun handleMetaState(): Observable<PlayerHandleMetaState> { | |
return provider.currentlyPlaying() | |
.map { podcast -> | |
//Convert your model into information relevant to the View. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class PlayerHandleMetaState( | |
val title:String, | |
val subText:String, | |
val picture:String, | |
val bgColor:Int) | |
data class PlayerHandleIconState( | |
val icon:Int, | |
val iconColorFilter:Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class DetailsListState( | |
val listContents: List<DetailsListItemState>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class DetailsListItemState( | |
val title: String, | |
val formattedDate: String) | |
data class DetailsListItemIconState( | |
val icon: Int, | |
val iconColorFilter: Int) | |
data class DetailsListItemIconProgressState( | |
val subText: String, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class DetailsHeaderState( | |
val title: String, | |
val bgColor: Int, | |
val picture: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class UserFragmentStateData( | |
val title: String, | |
val description:String, | |
val picture: String, | |
val imagePlaceholder: Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class User( | |
val id: String, | |
val name: String, | |
val profilePicUrl: String, | |
val bio: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class User( | |
val id: String, | |
val name: String, | |
val profilePicUrl: String, | |
val bio: String) |
NewerOlder