remember scroll position when going from media to fullscreen mode
This commit is contained in:
parent
c6c945eb36
commit
40ec71c5c2
1 changed files with 4 additions and 1 deletions
|
@ -41,6 +41,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
private var mIsGetAnyIntent = false
|
private var mIsGetAnyIntent = false
|
||||||
private var mIsGettingMedia = false
|
private var mIsGettingMedia = false
|
||||||
private var mShowAll = false
|
private var mShowAll = false
|
||||||
|
private var mLoadedInitialPhotos = false
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -172,8 +173,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
if (media.size == 0) {
|
if (media.size == 0) {
|
||||||
media_holder.isRefreshing = true
|
media_holder.isRefreshing = true
|
||||||
} else {
|
} else {
|
||||||
|
if (!mLoadedInitialPhotos)
|
||||||
gotMedia(media)
|
gotMedia(media)
|
||||||
}
|
}
|
||||||
|
mLoadedInitialPhotos = true
|
||||||
|
|
||||||
GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
||||||
gotMedia(it)
|
gotMedia(it)
|
||||||
|
|
Loading…
Reference in a new issue