diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 5561de9bb..e7aab694e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -151,7 +151,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { handlePermission(PERMISSION_WRITE_STORAGE) { if (it) { val dirName = getHumanizedFilename(mPath) - title = if (mShowAll) resources.getString(R.string.all_folders) else dirName + supportActionBar?.title = if (mShowAll) resources.getString(R.string.all_folders) else dirName getMedia() setupLayoutManager() checkIfColorChanged() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index 4711f1c62..de41a30a8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -79,7 +79,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList val bundle = Bundle() val file = File(mUri.toString()) mMedium = Medium(getFilenameFromUri(mUri!!), mUri.toString(), mIsVideo, 0, 0, file.length()) - title = mMedium!!.name + supportActionBar?.title = mMedium!!.name bundle.putSerializable(MEDIUM, mMedium) if (savedInstanceState == null) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 428c1125b..a551e96ff 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -185,7 +185,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View showSystemUI() mDirectory = File(mPath).parent - title = mPath.getFilenameFromPath() + supportActionBar?.title = mPath.getFilenameFromPath() view_pager.onGlobalLayout { if (!isActivityDestroyed()) { @@ -463,7 +463,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun toggleFileVisibility(hide: Boolean) { toggleFileVisibility(getCurrentFile(), hide) { val newFileName = it.absolutePath.getFilenameFromPath() - title = newFileName + supportActionBar?.title = newFileName getCurrentMedium()!!.apply { name = newFileName @@ -835,7 +835,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun updateActionbarTitle() { runOnUiThread { if (mPos < getCurrentMedia().size) { - title = getCurrentMedia()[mPos].path.getFilenameFromPath() + supportActionBar?.title = getCurrentMedia()[mPos].path.getFilenameFromPath() } } }