mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 04:10:45 +01:00
do not allow landscape mode on phones at main screen
This commit is contained in:
parent
10e2021dc9
commit
897aa82c3f
@ -2,6 +2,7 @@ package com.simplemobiletools.calendar.activities
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.ActivityCompat
|
||||
@ -69,6 +70,8 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
||||
calendar_fab.setOnClickListener { launchNewEventIntent() }
|
||||
checkWhatsNewDialog()
|
||||
storeStoragePaths()
|
||||
if (resources.getBoolean(R.bool.portrait_only))
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
4
app/src/main/res/values-sw600dp/booleans.xml
Normal file
4
app/src/main/res/values-sw600dp/booleans.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="portrait_only">false</bool>
|
||||
</resources>
|
4
app/src/main/res/values/booleans.xml
Normal file
4
app/src/main/res/values/booleans.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="portrait_only">true</bool>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user