Implement splash screen functionality
Adds a splash screen to improve the app's initial loading experience.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
@@ -49,6 +50,9 @@ dependencies {
|
||||
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
||||
implementation project(':capacitor-cordova-android-plugins')
|
||||
|
||||
// 스플래시 화면 플러그인 추가
|
||||
implementation "androidx.core:core-splashscreen:1.0.0"
|
||||
}
|
||||
|
||||
apply from: 'capacitor.build.gradle'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
@@ -15,7 +16,8 @@
|
||||
android:label="@string/title_activity_main"
|
||||
android:theme="@style/AppTheme.NoActionBarLaunch"
|
||||
android:launchMode="singleTask"
|
||||
android:exported="true">
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
|
||||
package com.lovable.zellyfinance;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.getcapacitor.BridgeActivity;
|
||||
import com.getcapacitor.Plugin;
|
||||
|
||||
public class MainActivity extends BridgeActivity {}
|
||||
public class MainActivity extends BridgeActivity {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// 스플래시 화면 처리를 위한 추가 초기화 코드
|
||||
registerPlugin(com.capacitorjs.plugins.splashscreen.SplashScreenPlugin.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
<color name="ic_launcher_background">#F0F4F8</color>
|
||||
</resources>
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
@@ -18,5 +19,6 @@
|
||||
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
||||
<item name="android:background">@drawable/splash</item>
|
||||
<item name="android:statusBarColor">@color/ic_launcher_background</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -11,10 +11,12 @@ const config: CapacitorConfig = {
|
||||
},
|
||||
plugins: {
|
||||
SplashScreen: {
|
||||
launchShowDuration: 2000,
|
||||
backgroundColor: "#f2f2f2",
|
||||
launchShowDuration: 3000, // 스플래시 화면 표시 시간 3초로 증가
|
||||
backgroundColor: "#F0F4F8", // 배경색 밝은 회색으로 변경
|
||||
androidScaleType: "CENTER_CROP",
|
||||
showSpinner: false
|
||||
showSpinner: true, // 로딩 스피너 표시
|
||||
spinnerColor: "#6BCB77", // 스피너 색상 (브랜드 색상)
|
||||
androidSpinnerStyle: "large" // 안드로이드 스피너 크기
|
||||
},
|
||||
Keyboard: {
|
||||
resize: "body",
|
||||
|
||||
10
package-lock.json
generated
10
package-lock.json
generated
@@ -13,6 +13,7 @@
|
||||
"@capacitor/core": "^7.1.0",
|
||||
"@capacitor/ios": "^7.1.0",
|
||||
"@capacitor/keyboard": "^7.0.0",
|
||||
"@capacitor/splash-screen": "^7.0.0",
|
||||
"@hookform/resolvers": "^3.9.0",
|
||||
"@radix-ui/react-accordion": "^1.2.0",
|
||||
"@radix-ui/react-alert-dialog": "^1.1.1",
|
||||
@@ -236,6 +237,15 @@
|
||||
"@capacitor/core": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@capacitor/splash-screen": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@capacitor/splash-screen/-/splash-screen-7.0.0.tgz",
|
||||
"integrity": "sha512-y25WNRcl+MY/ltb3OZPZPpNmhVFW9270QneJY8tjY7FJc78zWEszj1cX84LJS4LeTHfHi4NcNW4y0/oewWG88A==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"@capacitor/core": "^7.1.0",
|
||||
"@capacitor/ios": "^7.1.0",
|
||||
"@capacitor/keyboard": "^7.0.0",
|
||||
"@capacitor/splash-screen": "^7.0.0",
|
||||
"@hookform/resolvers": "^3.9.0",
|
||||
"@radix-ui/react-accordion": "^1.2.0",
|
||||
"@radix-ui/react-alert-dialog": "^1.1.1",
|
||||
|
||||
Reference in New Issue
Block a user