make sure the Print button at PDF viewer is clickable in landscape too

This commit is contained in:
tibbi 2022-07-28 12:35:40 +02:00
parent bfca4a89fd
commit 699a3ea336
2 changed files with 11 additions and 0 deletions

View file

@ -93,6 +93,7 @@
<activity
android:name=".activities.PDFViewerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:label="@string/pdf_viewer"
android:theme="@style/TranslucentTheme">

View file

@ -1,6 +1,7 @@
package com.simplemobiletools.filemanager.pro.activities
import android.content.Context
import android.content.res.Configuration
import android.graphics.Color
import android.os.Bundle
import android.print.PrintAttributes
@ -68,6 +69,15 @@ class PDFViewerActivity : SimpleActivity() {
}
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
if (!portrait && navigationBarRight && navigationBarWidth > 0) {
pdf_viewer_appbar.setPadding(0, 0, navigationBarWidth, 0)
} else {
pdf_viewer_appbar.setPadding(0, 0, 0, 0)
}
}
private fun checkIntent() {
val uri = intent.data
if (uri == null) {