屏蔽安卓 5.0 以下设备的视频播放功能
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user