From 43242c8e7915b968bb7a6f3f22bded7704f0e40f Mon Sep 17 00:00:00 2001
From: feiyu02 <feiyu02@163.com>
Date: 星期二, 01 九月 2020 09:55:06 +0800
Subject: [PATCH] 1. 修复问题修改界面问题子项无法显示为原纪录的问题

---
 app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseActivity.kt |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseActivity.kt
index 17463b1..bcd8e5d 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseActivity.kt
@@ -1,7 +1,9 @@
 package cn.flightfeather.thirdapp.module.base
 
+import android.annotation.SuppressLint
 import android.content.Context
 import android.content.Intent
+import android.content.pm.ActivityInfo
 import android.os.Bundle
 import android.support.v4.app.Fragment
 import android.support.v4.app.FragmentManager
@@ -25,8 +27,14 @@
 
     protected val disposableList = mutableListOf<Disposable>()
 
+    @SuppressLint("SourceLockedOrientationActivity")
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
+        try {
+            requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
         setContentView(getLayoutId())
         rootView = findViewById<ViewGroup>(android.R.id.content).getChildAt(0) as ViewGroup
     }

--
Gitblit v1.9.3