clean
This commit is contained in:
parent
c524e6c0fb
commit
20ddba6ad7
|
@ -11,8 +11,8 @@ android {
|
|||
applicationId "com.lizongying.mytv"
|
||||
minSdk 23
|
||||
targetSdk 33
|
||||
versionCode getVersionCode()
|
||||
versionName getVersionName()
|
||||
versionCode VersionCode()
|
||||
versionName VersionName()
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@ -32,7 +32,7 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
static def getVersionCode() {
|
||||
static def VersionCode() {
|
||||
try {
|
||||
def process = 'git rev-list --count HEAD'.execute()
|
||||
process.waitFor()
|
||||
|
@ -42,7 +42,7 @@ static def getVersionCode() {
|
|||
}
|
||||
}
|
||||
|
||||
static def getVersionName() {
|
||||
static def VersionName() {
|
||||
try {
|
||||
def process = 'git describe --tags --always'.execute()
|
||||
process.waitFor()
|
||||
|
@ -53,7 +53,6 @@ static def getVersionName() {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.11.0-beta02'
|
||||
implementation 'androidx.leanback:leanback:1.0.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.lizongying.mytv
|
|||
|
||||
import android.graphics.Bitmap
|
||||
import android.media.MediaMetadataRetriever
|
||||
import android.util.Log
|
||||
import android.view.ContextThemeWrapper
|
||||
import android.view.ViewGroup
|
||||
import androidx.leanback.widget.ImageCardView
|
||||
|
@ -13,11 +12,6 @@ import kotlinx.coroutines.delay
|
|||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
|
||||
/**
|
||||
* A CardPresenter is used to generate Views and bind Objects to them on demand.
|
||||
* It contains an ImageCardView.
|
||||
*/
|
||||
class CardPresenter(private val lifecycleScope: LifecycleCoroutineScope) : Presenter() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup): ViewHolder {
|
||||
|
@ -91,9 +85,7 @@ class CardPresenter(private val lifecycleScope: LifecycleCoroutineScope) : Prese
|
|||
|
||||
companion object {
|
||||
private const val TAG = "CardPresenter"
|
||||
|
||||
private const val CARD_WIDTH = 313
|
||||
|
||||
private const val CARD_HEIGHT = 176
|
||||
}
|
||||
}
|
|
@ -2,7 +2,6 @@ package com.lizongying.mytv
|
|||
|
||||
import java.io.Serializable
|
||||
|
||||
|
||||
data class Info(
|
||||
var rowPosition: Int = 0,
|
||||
var itemPosition: Int = 0,
|
||||
|
|
|
@ -13,10 +13,6 @@ import android.widget.Toast
|
|||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
|
||||
|
||||
/**
|
||||
* Loads [MainFragment].
|
||||
*/
|
||||
class MainActivity : FragmentActivity() {
|
||||
|
||||
private val playbackFragment = PlaybackFragment()
|
||||
|
|
|
@ -18,9 +18,6 @@ import androidx.leanback.widget.Row
|
|||
import androidx.leanback.widget.RowPresenter
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
|
||||
/**
|
||||
* Loads a grid of cards with movies to browse.
|
||||
*/
|
||||
class MainFragment : BrowseSupportFragment() {
|
||||
|
||||
var itemPosition: Int = 0
|
||||
|
|
|
@ -10,7 +10,6 @@ import androidx.leanback.media.PlaybackTransportControlGlue
|
|||
import androidx.leanback.widget.PlaybackControlsRow
|
||||
import java.io.IOException
|
||||
|
||||
/** Handles video playback with media controls. */
|
||||
class PlaybackFragment : VideoSupportFragment() {
|
||||
|
||||
private lateinit var mTransportControlGlue: PlaybackTransportControlGlue<MediaPlayerAdapter>
|
||||
|
@ -28,7 +27,6 @@ class PlaybackFragment : VideoSupportFragment() {
|
|||
}
|
||||
|
||||
override fun showControlsOverlay(runAnimation: Boolean) {
|
||||
// We will do nothing here, and thus controls will never be shown
|
||||
}
|
||||
|
||||
fun play(tv: TV) {
|
||||
|
|
|
@ -2,9 +2,6 @@ package com.lizongying.mytv
|
|||
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* Movie class represents video entity with title, description, image thumbs and video url.
|
||||
*/
|
||||
data class TV(
|
||||
var id: Int = 0,
|
||||
var title: String? = null,
|
||||
|
|
Loading…
Reference in New Issue