Skip to content

Commit 2d33432

Browse files
author
saikou
committed
Adding SplashScreen and more bug fixed
1 parent 525f428 commit 2d33432

File tree

15 files changed

+145
-5
lines changed

15 files changed

+145
-5
lines changed

.idea/deploymentTargetDropDown.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package com.azamovhudstc.graphqlanilist.ui.screens
2+
3+
import android.os.Bundle
4+
import androidx.fragment.app.Fragment
5+
import android.view.LayoutInflater
6+
import android.view.View
7+
import android.view.ViewGroup
8+
import androidx.core.view.ViewCompat
9+
import androidx.core.view.WindowCompat
10+
import androidx.lifecycle.lifecycleScope
11+
import androidx.navigation.fragment.findNavController
12+
import com.azamovhudstc.graphqlanilist.R
13+
import com.azamovhudstc.graphqlanilist.application.App
14+
import com.azamovhudstc.graphqlanilist.databinding.DetailScreenBinding
15+
import com.azamovhudstc.graphqlanilist.databinding.FragmentSplashScreenBinding
16+
import com.azamovhudstc.graphqlanilist.utils.animationTransactionClearStack
17+
import com.azamovhudstc.graphqlanilist.utils.slideUp
18+
import kotlinx.coroutines.delay
19+
20+
21+
class SplashScreen : Fragment(R.layout.fragment_splash_screen) {
22+
private var binding: FragmentSplashScreenBinding? = null
23+
24+
override fun onCreate(savedInstanceState: Bundle?) {
25+
super.onCreate(savedInstanceState)
26+
requireActivity().window.statusBarColor=App.instance.getColor(R.color.colorPrimaryDark)
27+
}
28+
29+
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
30+
super.onViewCreated(view, savedInstanceState)
31+
binding = FragmentSplashScreenBinding.bind(view)
32+
33+
lifecycleScope.launchWhenCreated {
34+
binding?.apply {
35+
splashContainer.slideUp(900,1)
36+
splashLogo.slideUp(900,1,)
37+
38+
}
39+
delay(1300)
40+
findNavController().navigate(R.id.homeScreen,null, animationTransactionClearStack(R.id.splashScreen).build())
41+
}
42+
43+
44+
}
45+
}
66.1 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:autoMirrored="true" android:height="24dp"
2+
android:tint="#000000" android:viewportHeight="24"
3+
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#000000"
2+
android:viewportHeight="24" android:viewportWidth="24"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
5+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#000000"
2+
android:viewportHeight="24" android:viewportWidth="24"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="@android:color/white" android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
5+
</vector>

app/src/main/res/drawable/bg.jpg

38.5 KB
Loading

app/src/main/res/drawable/img.png

159 KB
Loading

0 commit comments

Comments
 (0)