Dola TENG 1 vuosi sitten
vanhempi
commit
5a4d02a7e2

+ 6 - 3
app/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    package="com.sambath.sbc">
+    package="com.sambath.sbc" >
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -17,7 +17,10 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme"
         android:usesCleartextTraffic="true"
-        tools:targetApi="m">
+        tools:targetApi="m" >
+        <activity
+            android:name=".app.MainActivity"
+            android:exported="false" />
         <activity
             android:name=".screen.register.RegisterActivity"
             android:exported="false" />
@@ -38,7 +41,7 @@
             android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
             android:exported="true"
             android:screenOrientation="sensorPortrait"
-            android:windowSoftInputMode="adjustResize">
+            android:windowSoftInputMode="adjustResize" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 

+ 8 - 4
app/src/main/java/com/sambath/sbc/screen/splash/SplashScreenActivity.kt

@@ -9,6 +9,7 @@ import android.view.animation.RotateAnimation
 import android.widget.ImageView
 import com.sambath.sbc.R
 import com.sambath.sbc.app.App
+import com.sambath.sbc.app.MainActivity
 import com.sambath.sbc.app.ShareActivity
 import com.sambath.sbc.base.BaseActivity
 import com.sambath.sbc.screen.login.LoginActivity
@@ -52,15 +53,18 @@ class SplashScreenActivity : BaseActivity() {
             }
 
             override fun onAnimationEnd(animation: Animation?) {
-                    //var nextScreen: Any = LoginActivity::class.java
-                    if (prefHelper.getToken().isNotEmpty()) {
-                       // nextScreen = ShareActivity::class.java
+
+                    //Test
+                    val intent = Intent(this@SplashScreenActivity, MainActivity::class.java)
+                    startActivity(intent)
+
+                    /*if (prefHelper.getToken().isNotEmpty()) {
                         val intent = Intent(this@SplashScreenActivity, ShareActivity::class.java)
                         startActivity(intent)
                     }else{
                         val intent = Intent(this@SplashScreenActivity, LoginActivity::class.java)
                         startActivity(intent)
-                    }
+                    }*/
 
                     finishAffinity()