屏蔽安卓 5.0 以下设备的视频播放功能

This commit is contained in:
chenjuntao
2019-01-25 14:22:39 +08:00
parent a2088e5cd9
commit 3202764f22

View File

@ -3,6 +3,7 @@ package com.gh.gamecenter.gamedetail.desc
import android.app.Activity
import android.content.Context
import android.databinding.DataBindingUtil
import android.os.Build
import android.support.v4.app.Fragment
import android.support.v7.widget.RecyclerView
import android.text.TextUtils
@ -84,7 +85,9 @@ class GameGalleryAdapter(var context: Context,
}
override fun getItemViewType(position: Int): Int {
return if (position == 0 && !TextUtils.isEmpty(mVideo)) {
return if (position == 0
&& !TextUtils.isEmpty(mVideo)
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
VIDEO
} else {
IMAGE