Skip to content
Snippets Groups Projects
Commit a76efc6d authored by Rinaldy Adin's avatar Rinaldy Adin
Browse files

fix: lock rotation on all expect graph, error still persist

parent 07f74fa8
1 merge request!19Feat/twibbon
......@@ -6,6 +6,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.pm.ActivityInfo
import android.os.Bundle
import android.view.View
import android.widget.Toast
......@@ -93,6 +94,7 @@ class MainActivity : AppCompatActivity(), ExportAlertDialogFragment.ExportAlertD
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR
preferenceDataStoreHelper = PreferenceDataStoreHelper(applicationContext)
binding = ActivityMainBinding.inflate(layoutInflater)
......@@ -117,6 +119,9 @@ class MainActivity : AppCompatActivity(), ExportAlertDialogFragment.ExportAlertD
navController.addOnDestinationChangedListener { _, destination, _ ->
if (destination.id == R.id.navigation_form_transaction) navView.visibility = View.GONE
else navView.visibility = View.VISIBLE
if (destination.id == R.id.navigation_graph) requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR
else requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}
LocalBroadcastManager.getInstance(this).registerReceiver(br, filter)
......
package com.example.abe.ui.login
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import android.util.Patterns
import android.view.View
......@@ -65,6 +66,7 @@ class LoginActivity : AppCompatActivity(), LoginResultCallback {
super.onCreate(savedInstanceState)
binding = ActivityLoginBinding.inflate(layoutInflater)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
supportActionBar?.hide()
val view = binding.root
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment