add missing play button functionality for highlight media in HomeFragment
This commit is contained in:
@ -9,6 +9,7 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.fragment.app.commit
|
||||
import org.mosad.teapod.R
|
||||
import org.mosad.teapod.ui.activity.player.PlayerActivity
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
/**
|
||||
@ -24,6 +25,20 @@ fun FragmentActivity.showFragment(fragment: Fragment) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the player as new activity.
|
||||
*
|
||||
* @param seasonId The ID of the season the episode to be played is in
|
||||
* @param episodeId The ID of the episode to play
|
||||
*/
|
||||
fun Activity.startPlayer(seasonId: String, episodeId: String) {
|
||||
val intent = Intent(this, PlayerActivity::class.java).apply {
|
||||
putExtra(getString(R.string.intent_season_id), seasonId)
|
||||
putExtra(getString(R.string.intent_episode_id), episodeId)
|
||||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
/**
|
||||
* hide the status and navigation bar
|
||||
*/
|
||||
|
Reference in New Issue
Block a user