set translucent navigation bar programmatically where appropriate

This commit is contained in:
tibbi 2017-12-01 11:37:48 +01:00
parent 9fbbd902e8
commit e04c4da1d6
6 changed files with 8 additions and 28 deletions

View file

@ -47,7 +47,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.0.16'
implementation 'com.simplemobiletools:commons:3.0.17'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.8.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
implementation 'com.android.support:multidex:1.0.2'

View file

@ -60,8 +60,7 @@
<activity
android:name=".activities.ViewPagerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:parentActivityName=".activities.MediaActivity"
android:theme="@style/FullScreenTheme">
android:parentActivityName=".activities.MediaActivity">
<intent-filter>
<action android:name="com.android.camera.action.REVIEW"/>
@ -96,8 +95,7 @@
<activity
android:name=".activities.PhotoVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenTheme"/>
android:configChanges="orientation|keyboardHidden|screenSize"/>
<activity
android:name=".activities.IncludedFoldersActivity"
@ -111,8 +109,7 @@
<activity
android:name=".activities.PhotoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenTheme">
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@ -125,8 +122,7 @@
<activity
android:name=".activities.VideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenTheme">
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

View file

@ -40,6 +40,8 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.fragment_holder)
setTranslucentNavigation()
handlePermission(PERMISSION_WRITE_STORAGE) {
if (it) {
checkIntent(savedInstanceState)

View file

@ -80,6 +80,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_medium)
setTranslucentNavigation()
handlePermission(PERMISSION_WRITE_STORAGE) {
if (it) {

View file

@ -1,7 +0,0 @@
<resources>
<style name="FullScreenTheme" parent="FullScreenTheme.Base">
<item name="android:windowTranslucentNavigation">true</item>
</style>
</resources>

View file

@ -2,16 +2,4 @@
<style name="AppTheme" parent="AppTheme.Base"/>
<style name="FullScreenTheme.Base" parent="AppTheme">
<item name="android:windowContentOverlay">@null</item>
<item name="actionBarStyle">@style/MyFullScreenActionBar</item>
<item name="android:actionBarStyle">@style/MyFullScreenActionBar</item>
</style>
<style name="FullScreenTheme" parent="FullScreenTheme.Base"/>
<style name="MyFullScreenActionBar" parent="Widget.AppCompat.Light.ActionBar">
<item name="titleTextStyle">@style/AppTheme.ActionBar.TitleTextStyle</item>
</style>
</resources>