Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOD/#78] splash / Splash 화면 앱 호환성 대응 및 다크모드 비활성화 #80

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">
<!-- Add uses-permissions -->
<uses-permission android:name="android.permission.INTERNET" />

<uses-feature android:name="android.hardware.camera.any" />

<uses-permission android:name="android.permission.CAMERA" />

<application
Expand All @@ -23,35 +21,33 @@
<activity
android:name="com.keyneez.presentation.splash.SplashActivity"
android:exported="true"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:theme="@style/Theme.Keyneez.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<activity
android:name="com.keyneez.presentation.onboarding.OnboardingActivity"
android:exported="true"
android:screenOrientation="portrait">

</activity>
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="com.keyneez.presentation.login.LoginActivity"
android:exported="true"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="com.keyneez.presentation.signup.SignupActivity"
android:exported="true"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="com.keyneez.presentation.main.MainActivity"
android:exported="true"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="com.keyneez.presentation.main.detail.DetailActivity"
android:exported="true"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name="com.keyneez.presentation.main.search.SearchActivity"
Expand All @@ -70,5 +66,4 @@
android:exported="false"
android:screenOrientation="portrait" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,19 @@ package com.keyneez.presentation.splash

import android.content.Intent
import android.os.Bundle
import android.os.Handler
import androidx.appcompat.app.AppCompatActivity
import com.keyneez.presentation.onboarding.OnboardingActivity
import com.keyneez.util.binding.BindingActivity
import com.lab.keyneez.R
import com.lab.keyneez.databinding.ActivitySplashBinding

class SplashActivity : BindingActivity<ActivitySplashBinding>(R.layout.activity_splash) {
class SplashActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_splash)

Handler().postDelayed({
val intent = Intent(this, OnboardingActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent)
finish()
}, DURATION)
intentToOnboarding()
}

companion object {
private const val DURATION: Long = 3000
private fun intentToOnboarding() {
startActivity(Intent(this, OnboardingActivity::class.java))
finish()
}
}
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/bg_splash_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/gray050" />
</shape>
</item>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/img_splash_logo" />
</item>
<item android:bottom="39dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@drawable/img_splash_copyright" />
</item>
</layer-list>
17 changes: 0 additions & 17 deletions app/src/main/res/drawable/ic_splash_bottom.xml

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable/img_splash_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 0 additions & 37 deletions app/src/main/res/layout/activity_splash.xml

This file was deleted.

16 changes: 15 additions & 1 deletion app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<!-- Base application theme. -->
<style name="Theme.Keyneez" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
Expand All @@ -18,5 +18,19 @@
<!-- Remove title bar -->
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- Bottom sheet dialog -->
<item name="bottomSheetDialogTheme">@style/AppBottomSheetDialogTheme</item>
</style>

<style name="AppBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalStyle</item>
</style>

<style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/shape_gray050_fill_top20_rect</item>
</style>

<style name="Theme.Keyneez.Splash">
<item name="android:background">@drawable/bg_splash_screen</item>
</style>
</resources>
36 changes: 36 additions & 0 deletions app/src/main/res/values-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<resources>
<!-- Base application theme. -->
<style name="Theme.Keyneez" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/gray900</item>
<item name="colorPrimaryVariant">@color/gray900</item>
<item name="colorOnPrimary">@color/gray050</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/gray900</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>

<!-- Customize your theme here. -->
<!-- Remove font padding -->
<item name="android:includeFontPadding">false</item>
<!-- Remove title bar -->
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- Bottom sheet dialog -->
<item name="bottomSheetDialogTheme">@style/AppBottomSheetDialogTheme</item>
</style>

<style name="AppBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalStyle</item>
</style>

<style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/shape_gray050_fill_top20_rect</item>
</style>

<style name="Theme.Keyneez.Splash">
<item name="android:windowSplashScreenBackground">@drawable/bg_splash_screen</item>
</style>
</resources>
14 changes: 9 additions & 5 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<!-- Base application theme. -->
<style name="Theme.Keyneez" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
Expand All @@ -21,12 +21,16 @@
<!-- Bottom sheet dialog -->
<item name="bottomSheetDialogTheme">@style/AppBottomSheetDialogTheme</item>
</style>
<style name="AppBottomSheetDialogTheme"
parent="Theme.Design.Light.BottomSheetDialog">

<style name="AppBottomSheetDialogTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalStyle</item>
</style>
<style name="AppModalStyle"
parent="Widget.Design.BottomSheet.Modal">

<style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/shape_gray050_fill_top20_rect</item>
</style>

<style name="Theme.Keyneez.Splash">
<item name="android:background">@drawable/bg_splash_screen</item>
</style>
</resources>