Skip to content

Instantly share code, notes, and snippets.

Avatar

Julien DE NADAI juliendn

View GitHub Profile
@juliendn
juliendn / ChronoActivity2.kt
Last active Feb 22, 2018
VM kotlin integration
View ChronoActivity2.kt
class ChronoActivity2 : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// The ViewModelStore provides a new ViewModel or one previously created.
val chronometerViewModel = getViewModel(this) {
ChronometerViewModel(SystemClock.elapsedRealtime())
}
@juliendn
juliendn / CustomTimeBar.kt
Created Nov 29, 2017
Extremely simple timebar for exoplayer
View CustomTimeBar.kt
package fr.juliendenadai.player
import android.content.Context
import android.util.AttributeSet
import android.widget.ProgressBar
import com.google.android.exoplayer2.ui.TimeBar
/**
* Created by Julien DE NADAI on 28/11/2017.
*/