Samsung DexでresizeColumnWidthが呼ばれない問題の対応

This commit is contained in:
tateisu 2019-11-14 15:37:45 +09:00
parent 2a31a439d1
commit 9864550ff7
2 changed files with 11 additions and 1 deletions

View File

@ -44,7 +44,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -7,6 +7,7 @@ import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.content.res.ColorStateList
import android.content.res.Configuration
import android.graphics.Typeface
import android.net.Uri
import android.os.*
@ -487,6 +488,14 @@ class ActMain : AppCompatActivity()
log.w("onNewIntent: isResumed = isResumed")
}
override fun onConfigurationChanged(newConfig : Configuration) {
log.d("onConfigurationChanged")
super.onConfigurationChanged(newConfig)
if(newConfig.screenHeightDp > 0 || newConfig.screenHeightDp >0){
tabOnly { env -> resizeColumnWidth(env) }
}
}
override fun onSaveInstanceState(outState : Bundle) {
super.onSaveInstanceState(outState)
@ -2535,6 +2544,7 @@ class ActMain : AppCompatActivity()
if(screen_width < column_w_min * 2) {
// 最小幅で2つ表示できないのなら1カラム表示
nScreenColumn = 1
column_w = screen_width
} else {