use a black background at fullscreen media if selected so
This commit is contained in:
parent
a780d36a6e
commit
dccca19844
2 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,9 @@ import android.content.res.Configuration
|
|||
import android.database.Cursor
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.Color
|
||||
import android.graphics.Matrix
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.hardware.SensorManager
|
||||
import android.media.ExifInterface
|
||||
import android.net.Uri
|
||||
|
@ -100,6 +102,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
reloadViewPager()
|
||||
scanPath(mPath) {}
|
||||
setupOrientationEventListener()
|
||||
|
||||
if (config.darkBackground)
|
||||
view_pager.background = ColorDrawable(Color.BLACK)
|
||||
}
|
||||
|
||||
private fun setupOrientationEventListener() {
|
||||
|
|
|
@ -204,7 +204,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
|
||||
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?) {
|
||||
|
|
Loading…
Reference in a new issue