mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-14 19:15:41 +01:00
use a black background at fullscreen media if selected so
This commit is contained in:
parent
a780d36a6e
commit
dccca19844
@ -7,7 +7,9 @@ import android.content.res.Configuration
|
|||||||
import android.database.Cursor
|
import android.database.Cursor
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
|
import android.graphics.Color
|
||||||
import android.graphics.Matrix
|
import android.graphics.Matrix
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.hardware.SensorManager
|
import android.hardware.SensorManager
|
||||||
import android.media.ExifInterface
|
import android.media.ExifInterface
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
@ -100,6 +102,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
reloadViewPager()
|
reloadViewPager()
|
||||||
scanPath(mPath) {}
|
scanPath(mPath) {}
|
||||||
setupOrientationEventListener()
|
setupOrientationEventListener()
|
||||||
|
|
||||||
|
if (config.darkBackground)
|
||||||
|
view_pager.background = ColorDrawable(Color.BLACK)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupOrientationEventListener() {
|
private fun setupOrientationEventListener() {
|
||||||
|
@ -204,7 +204,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onReady() {
|
override fun onReady() {
|
||||||
background = ColorDrawable(context.config.backgroundColor)
|
background = ColorDrawable(if (context.config.darkBackground) Color.BLACK else context.config.backgroundColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTileLoadError(e: Exception?) {
|
override fun onTileLoadError(e: Exception?) {
|
||||||
|
Loading…
Reference in New Issue
Block a user