check medium resolution at fullscreen media change
This commit is contained in:
parent
2815244f58
commit
2540763480
3 changed files with 11 additions and 6 deletions
|
@ -7,7 +7,4 @@ class PhotoActivity : PhotoVideoActivity() {
|
|||
PhotoVideoActivity.mIsVideo = false
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun systemUiVisibilityChanged(visibility: Int) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -359,6 +359,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
updateActionbarTitle()
|
||||
updatePagerItems()
|
||||
invalidateOptionsMenu()
|
||||
checkOrientation()
|
||||
}
|
||||
mCurrAsyncTask!!.execute()
|
||||
}
|
||||
|
@ -384,6 +385,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
scanPath(mDirectory) {}
|
||||
}
|
||||
|
||||
private fun checkOrientation() {
|
||||
if (config.autoRotateScreen) {
|
||||
val res = getCurrentFile().getResolution()
|
||||
}
|
||||
}
|
||||
|
||||
override fun fragmentClicked() {
|
||||
mIsFullScreen = !mIsFullScreen
|
||||
if (mIsFullScreen) {
|
||||
|
@ -426,6 +433,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
updateActionbarTitle()
|
||||
mRotationDegrees = 0f
|
||||
supportInvalidateOptionsMenu()
|
||||
checkOrientation()
|
||||
}
|
||||
|
||||
override fun onPageScrollStateChanged(state: Int) {
|
||||
|
|
|
@ -41,7 +41,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
private var mDuration = 0
|
||||
|
||||
lateinit var mView: View
|
||||
lateinit var mMedium: Medium
|
||||
lateinit var medium: Medium
|
||||
|
||||
companion object {
|
||||
private val TAG = VideoFragment::class.java.simpleName
|
||||
|
@ -51,7 +51,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
mView = inflater.inflate(R.layout.pager_video_item, container, false)
|
||||
|
||||
mMedium = arguments.getSerializable(MEDIUM) as Medium
|
||||
medium = arguments.getSerializable(MEDIUM) as Medium
|
||||
if (savedInstanceState != null) {
|
||||
mCurrTime = savedInstanceState.getInt(PROGRESS)
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
|
||||
try {
|
||||
mMediaPlayer = MediaPlayer().apply {
|
||||
setDataSource(context, Uri.parse(mMedium.path))
|
||||
setDataSource(context, Uri.parse(medium.path))
|
||||
setDisplay(mSurfaceHolder)
|
||||
setOnCompletionListener { videoCompleted() }
|
||||
setOnVideoSizeChangedListener({ mediaPlayer, width, height -> setVideoSize() })
|
||||
|
|
Loading…
Reference in a new issue