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

Fix #11: Introduce Oppia splash screen. #60

Merged
merged 60 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
cc33261
created splash screen
veena14cs Aug 20, 2019
0e3079d
changed splash image
veena14cs Aug 20, 2019
424e032
added fade transition
veena14cs Aug 21, 2019
a0bf5bd
handle configuration changes
veena14cs Aug 21, 2019
36b6e18
created background for splashtheme
veena14cs Aug 21, 2019
96ba6b5
implemented Logging system
veena14cs Aug 21, 2019
22b913e
fixed issues
veena14cs Aug 22, 2019
14bf295
Update misc.xml
veena14cs Aug 22, 2019
8f15b20
Fixed issues
veena14cs Aug 22, 2019
5ae198c
working on test cases
veena14cs Aug 23, 2019
81f9ce7
resoilved conflicts
veena14cs Aug 26, 2019
92bb196
Update styles.xml
veena14cs Aug 26, 2019
85cb77b
fixed java doc comments
veena14cs Aug 26, 2019
1de5966
Update activity_splash.xml
veena14cs Aug 26, 2019
01e57c9
Fixed issues
veena14cs Aug 26, 2019
f74b077
uncommented some code
veena14cs Aug 26, 2019
ffcf8ea
fixed .idea file
veena14cs Aug 26, 2019
141ae32
writting unit test
veena14cs Aug 27, 2019
e78eaae
Workinh on writting testcase for fragment
veena14cs Aug 28, 2019
451c3a3
Merge branch 'splash-screen' of https://github.com/oppia/oppia-androi…
veena14cs Aug 28, 2019
c48b255
Fixing issue with test case
veena14cs Aug 28, 2019
95688f4
uncommented code
veena14cs Aug 28, 2019
cb09d1c
Merge branch 'develop' into splash-screen
veena14cs Aug 28, 2019
b7bf48c
Merge branch 'develop' into splash-screen
veena14cs Aug 29, 2019
3ef5512
Fixed spacing, rename layout files
veena14cs Aug 30, 2019
709b712
working on test case
veena14cs Aug 30, 2019
4d2f38e
issue in passing test case
veena14cs Aug 30, 2019
0024f52
Update SplashFragment.kt
veena14cs Sep 3, 2019
1dcf71c
Update SplashFragment.kt
veena14cs Sep 3, 2019
e701408
working on testcase
veena14cs Sep 13, 2019
24f4b42
integrated testcase
veena14cs Sep 17, 2019
08e712e
Delete kotlinc.xml
veena14cs Sep 17, 2019
1a934bb
Update build.gradle
veena14cs Sep 17, 2019
98f14c7
Update AndroidManifest.xml
veena14cs Sep 17, 2019
971abc5
fixed issues
veena14cs Sep 18, 2019
5574ca7
Fixed testcases
veena14cs Sep 18, 2019
79d7033
removed unused imports
veena14cs Sep 19, 2019
6063cf2
added comma for dependency
veena14cs Sep 23, 2019
5b00ff4
Merge branch 'develop' into splash-screen
veena14cs Sep 23, 2019
86569bd
fixed minor issues
veena14cs Sep 23, 2019
65ad575
added javadoc comments for activitytestrule
veena14cs Sep 23, 2019
b6d6eb0
removed blank spaces
veena14cs Sep 23, 2019
1b80666
removed splashFragment as its not used anywhere
veena14cs Sep 23, 2019
f58dc0d
Delete splash_fragment.xml
veena14cs Sep 23, 2019
e1c4933
deleted bg_splash
veena14cs Sep 23, 2019
5c1abdd
Update build.gradle
veena14cs Sep 23, 2019
dba0a18
removed blank spaces
veena14cs Sep 23, 2019
fb4b3d3
Update SplashActivityTest.kt
veena14cs Sep 23, 2019
7e86eb6
Update SplashActivityTest.kt
veena14cs Sep 24, 2019
05dea97
Delete AndroidManifest.xml
veena14cs Sep 24, 2019
ad0d6f3
Merge branch 'develop' into splash-screen
veena14cs Sep 24, 2019
c44ee98
Update styles.xml
veena14cs Sep 24, 2019
9986646
Update SplashActivityTest.kt
veena14cs Sep 24, 2019
4f7d1b0
Delete output.json
veena14cs Sep 24, 2019
08cda5c
Delete manifest-merger-debug-report.txt
veena14cs Sep 24, 2019
371d4e5
Update SplashActivityTest.kt
veena14cs Sep 24, 2019
8b95965
Update SplashActivityTest.kt
veena14cs Sep 30, 2019
7de392e
Update SplashActivityTest.kt
veena14cs Oct 1, 2019
849ccda
updated manifest
veena14cs Oct 1, 2019
15adbd5
Update AndroidManifest.xml
veena14cs Oct 1, 2019
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
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
Expand All @@ -60,6 +60,8 @@ dependencies {
androidTestImplementation "com.google.truth:truth:0.43"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

implementation 'com.hypertrack:hyperlog:0.0.10'
veena14cs marked this conversation as resolved.
Show resolved Hide resolved

implementation project(":model")
implementation project(":utility")
}
18 changes: 11 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/OppiaTheme">
<activity android:name="org.oppia.app.HomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<activity android:name=".splash.SplashActivity"
android:theme="@style/SplashScreenTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.MAIN" />

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

<activity android:name=".HomeActivity">
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
</activity>

</application>

</manifest>
2 changes: 1 addition & 1 deletion app/src/main/java/org/oppia/app/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HomeActivity : AppCompatActivity() {

override fun onFailure(t: Throwable) {
// TODO(BenHenning): Replace this log statement with a clearer logging API.
Log.e("HomeActivity", "Failed to retrieve user app history", t)
Log.e("HomeActivity", "Failed to retrieve user app history = "+ t)
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
}
}, directExecutor())
}
Expand Down
27 changes: 27 additions & 0 deletions app/src/main/java/org/oppia/app/splash/SplashActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.oppia.app.splash

import android.os.Bundle
import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import org.oppia.app.R
import android.content.res.Configuration
veena14cs marked this conversation as resolved.
Show resolved Hide resolved

/*
* This activity acts as a container to SplashFragment
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
* There is a background theme set to this activity to display app logo until the app is initialized
*/
class SplashActivity : AppCompatActivity() {
veena14cs marked this conversation as resolved.
Show resolved Hide resolved

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
setContentView(R.layout.activity_splash)

veena14cs marked this conversation as resolved.
Show resolved Hide resolved
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

val fragment = SplashFragment()
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragment_container, fragment)
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
transaction.commitNow()

}
}
45 changes: 45 additions & 0 deletions app/src/main/java/org/oppia/app/splash/SplashFragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package org.oppia.app.splash

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import org.oppia.app.HomeActivity
import org.oppia.app.R

/*
* The SplashFragments navigates to Home page once
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be phrased in terms of its type, e.g.:

A fragment that navigates to HomeActivity once...

Please update, and format the Javadoc bits like mentioned above in HomeActivity.

* the app is finished loading completely
* */

veena14cs marked this conversation as resolved.
Show resolved Hide resolved
class SplashFragment : Fragment() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
savedInstanceState: Bundle?): View? {
// Inflate the layout for this fragment
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
val view = inflater.inflate(R.layout.fragment_splash, container, false)

routeToHomePage();

return view
}
private fun routeToHomePage() {

val intent = Intent(requireContext(), HomeActivity::class.java)
startActivity(intent)

// close this activity
activity!!.finish()

}

}

veena14cs marked this conversation as resolved.
Show resolved Hide resolved


5 changes: 5 additions & 0 deletions app/src/main/res/anim/fade_in.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@integer/fade_in_duration" />
6 changes: 6 additions & 0 deletions app/src/main/res/anim/fade_out.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="1.0" android:toAlpha="0.0"
android:fillAfter="true"
android:duration="@integer/fade_out_duration" />
8 changes: 8 additions & 0 deletions app/src/main/res/drawable/bg_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/splash_page"
android:gravity="fill">
</item>

</layer-list>
30 changes: 30 additions & 0 deletions app/src/main/res/drawable/splash_page.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="360dp"
android:height="640dp"
android:viewportWidth="360"
android:viewportHeight="640">
<group>
<clip-path android:pathData="M0,0h360v640h-360z M 0,0"/>
<path
android:pathData="M0,0h360v640h-360z"
android:fillColor="#019489"/>
</group>
<path
android:pathData="M80,258c0,-6.78 1.62,-12.35 5.16,-17.27A23.25,23.25 0,0 1,100.65 231a30.08,30.08 0,0 1,14.68 0.94,22.51 22.51,0 0,1 12.72,10.43 26.89,26.89 0,0 1,3.37 10,36.05 36.05,0 0,1 0.14,9.68c-1.08,8.47 -4.93,15.28 -12.15,20a23.15,23.15 0,0 1,-11.91 3.88,26.84 26.84,0 0,1 -13,-2.4 23.73,23.73 0,0 1,-9.82 -8.77,28.77 28.77,0 0,1 -4.38,-12.28C80.17,260.72 80.07,259 80,258ZM105,275.24h0a6.62,6.62 0,0 1,0.17 -0.71,22.8 22.8,0 0,1 2.23,-6.07 11.78,11.78 0,0 1,3.24 -3.81c0.23,-0.2 0.23,-0.31 0.13,-0.54a3.9,3.9 0,0 1,2 -5.16,1.24 1.24,0 0,1 0.23,-0.11 4,4 0,0 1,5.17 2.3,4.22 4.22,0 0,1 0.23,2 4,4 0,0 1,-5.9 2.87c-0.34,-0.2 -0.64,-0.47 -1,-0.74 -3.78,3.1 -5,7.46 -5.74,12a1.14,1.14 0,0 0,0.31 0,15.8 15.8,0 0,0 7.35,-1.69 17.6,17.6 0,0 0,5.81 -4.49,20.44 20.44,0 0,0 2.87,-4.55 20.89,20.89 0,0 0,1.68 -8,27.87 27.87,0 0,0 -0.37,-5.06 17.58,17.58 0,0 0,-4.32 -9.11,14.66 14.66,0 0,0 -5.36,-3.81 18.8,18.8 0,0 0,-6.95 -1.42c-0.81,0 -1.66,0 -2.47,0.07a16.25,16.25 0,0 0,-11.87 5.94A17.1,17.1 0,0 0,89.58 250a20.29,20.29 0,0 0,-1.48 8.6,21.78 21.78,0 0,0 2.33,9.48 16.34,16.34 0,0 0,10.62 8.68c0.65,0.16 1.29,0.27 2,0.4a3.52,3.52 0,0 0,0 -0.61,41.92 41.92,0 0,0 -1.35,-8A18.49,18.49 0,0 0,99 262.64a0.5,0.5 0,0 0,-0.67 -0.24,4 4,0 0,1 -5,-2.59 4.61,4.61 0,0 1,-0.17 -1.18,4 4,0 0,1 3.91,-4 3.9,3.9 0,0 1,2.57 0.91,3.83 3.83,0 0,1 1.35,4 4.07,4.07 0,0 1,-1.42 2.23c0.27,0.44 0.57,0.81 0.81,1.25a27.63,27.63 0,0 1,3.21 10.42c0.06,0.58 0.16,1.15 0.23,1.76L104,275.2v-4.52a71.54,71.54 0,0 1,0.47 -8.54,30.53 30.53,0 0,1 1.85,-7.89 0.31,0.31 0,0 0,-0.1 -0.34,4 4,0 1,1 5.54,-1.15 3.92,3.92 0,0 1,-4 1.72c-0.31,0 -0.37,0 -0.47,0.24 -0.24,0.64 -0.51,1.28 -0.71,1.92a32.28,32.28 0,0 0,-1.15 5.94c-0.14,1.55 -0.3,3.1 -0.37,4.66s-0.07,2.9 -0.1,4.35a34.72,34.72 0,0 1,0.13 3.64Z"
android:fillColor="#fff"/>
<path
android:pathData="M192.6,280.12c0.06,1.32 0.2,2.63 0.2,3.91q0,8.1 0.1,16.2c0,1.18 0,2.36 -0.07,3.54a1.85,1.85 0,0 1,-2.09 1.86h-4.08a2.09,2.09 0,0 1,-2.36 -2.23v-0.47c0,-13 0,-25.88 0,-38.84 0,-3.07 -0.14,-6.14 -0.34,-9.21 -0.1,-1.72 -0.47,-3.41 -0.71,-5.09a5.42,5.42 0,0 1,-0.1 -1.08,2.18 2.18,0 0,1 2,-2.3h0a18.69,18.69 0,0 1,2.8 0A2.57,2.57 0,0 1,190.3 248a17.75,17.75 0,0 1,1.38 4.52c0,0.17 0.07,0.3 0.11,0.57l0.27,-0.44a14.07,14.07 0,0 1,9 -6.61c4.56,-1.08 8.94,-0.67 12.89,2a15.24,15.24 0,0 1,5.74 7.7,24.36 24.36,0 0,1 1.38,7.12 32.22,32.22 0,0 1,-0.81 9.48,21.8 21.8,0 0,1 -5.77,10.42 13.79,13.79 0,0 1,-8.6 4,14.9 14.9,0 0,1 -6.85,-0.91 12.63,12.63 0,0 1,-6.08 -5.3l-0.23,-0.37A0.26,0.26 0,0 0,192.6 280.12ZM192.12,266.42v1.05a12.27,12.27 0,0 0,3.44 8.74,9.75 9.75,0 0,0 6.82,3.34 7.66,7.66 0,0 0,7.09 -3.68,13.84 13.84,0 0,0 1.62,-3.51 25.18,25.18 0,0 0,1 -8.4,13.44 13.44,0 0,0 -1.35,-5.74 8.91,8.91 0,0 0,-3.95 -4.42,8.45 8.45,0 0,0 -7.22,-0.2 11.78,11.78 0,0 0,-6.51 6.75,12.92 12.92,0 0,0 -1,6.07Z"
android:fillColor="#fff"/>
<path
android:pathData="M148.43,280.19c0.07,1.14 0.13,2.29 0.17,3.47s0.1,2.53 0.1,3.78L148.7,303a4.54,4.54 0,0 1,-0.14 1.18,1.76 1.76,0 0,1 -1.85,1.52c-1.52,0 -3,0 -4.56,0a2,2 0,0 1,-2.06 -2.09,4.57 4.57,0 0,1 0,-0.64c0,-12.82 0,-25.68 0,-38.5 0,-3.1 -0.14,-6.21 -0.34,-9.31 -0.1,-1.79 -0.47,-3.55 -0.71,-5.3a7,7 0,0 1,-0.06 -1.45,2.15 2.15,0 0,1 2.05,-1.89 18.83,18.83 0,0 1,2.81 0,2.57 2.57,0 0,1 2.29,1.58 17,17 0,0 1,1.38 4.63c0,0.13 0,0.27 0.07,0.4 0.51,-0.67 0.95,-1.38 1.45,-2a14.32,14.32 0,0 1,10 -5.4,16.17 16.17,0 0,1 7.89,0.91 14.67,14.67 0,0 1,8.27 8.4,23.11 23.11,0 0,1 1.62,7 33.29,33.29 0,0 1,-0.17 7.33,22.69 22.69,0 0,1 -6.34,13.39 13.47,13.47 0,0 1,-8.64 4,14.64 14.64,0 0,1 -6.85,-0.91 12.59,12.59 0,0 1,-6 -5.26,3.21 3.21,0 0,0 -0.27,-0.41ZM147.92,266.45v0.91a12.36,12.36 0,0 0,4.49 9.86,9.13 9.13,0 0,0 5.74,2.33 7.68,7.68 0,0 0,7.11 -3.68,14.68 14.68,0 0,0 2,-4.73 25.93,25.93 0,0 0,0.68 -5.33,15.69 15.69,0 0,0 -1.32,-7.56 9,9 0,0 0,-4 -4.45,8.41 8.41,0 0,0 -7.42,-0.1 12,12 0,0 0,-6.31 6.65,14.35 14.35,0 0,0 -1,6.1Z"
android:fillColor="#fff"/>
<path
android:pathData="M270.5,264.87c0.24,-2.67 0.24,-5.2 -1.08,-7.53a8,8 0,0 0,-5.8 -3.94,17 17,0 0,0 -11,1.65 15.44,15.44 0,0 1,-1.42 0.67,1.43 1.43,0 0,1 -2,-0.57 9.1,9.1 0,0 1,-1.55 -3.44,2.26 2.26,0 0,1 0.68,-2.13 9.11,9.11 0,0 1,3.17 -2.12,18.5 18.5,0 0,1 6.44,-1.69 44.88,44.88 0,0 1,5.2 -0.17,15.67 15.67,0 0,1 10.12,4 14.14,14.14 0,0 1,4.52 8.61,25.57 25.57,0 0,1 -0.13,8.37c-0.2,1.31 -0.47,2.63 -0.71,4a1.09,1.09 0,0 0,0.07 0.57,57.81 57.81,0 0,1 2.36,8.3c0.27,1.49 0.44,3 0.61,4.56a2.18,2.18 0,0 1,0 0.67A1.49,1.49 0,0 1,278.4 286c-1.35,0 -2.67,0 -4,0a1.45,1.45 0,0 1,-1.62 -1.48c-0.2,-1.49 -0.44,-2.94 -0.64,-4.42a0.58,0.58 0,0 0,-0.07 -0.21c-0.51,0.71 -1,1.45 -1.55,2.13a13.42,13.42 0,0 1,-7.53 4.45,15.58 15.58,0 0,1 -10.76,-1.11 11.65,11.65 0,0 1,-6.95 -10.26,13 13,0 0,1 1.35,-7.12 11.35,11.35 0,0 1,6.48 -5.43,19.29 19.29,0 0,1 13.19,-0.07 14.31,14.31 0,0 1,3.91 2.23ZM260.69,268.11a12.55,12.55 0,0 0,-1.93 0.23,5.91 5.91,0 0,0 -4.52,3.78 5.44,5.44 0,0 0,2.94 6.85,8.64 8.64,0 0,0 4.32,0.64 9.23,9.23 0,0 0,6.47 -3.13,3.93 3.93,0 0,0 0.07,-5.54 6.82,6.82 0,0 0,-1.18 -1A11.33,11.33 0,0 0,260.69 268.11Z"
android:fillColor="#fff"/>
<path
android:pathData="M236.36,262.67v13.54a6.27,6.27 0,0 0,0.1 1.14,1.54 1.54,0 0,0 2.16,1.32c0.4,-0.14 0.81,-0.31 1.21,-0.47s0.58,-0.21 0.88,-0.31a1,1 0,0 1,1.38 0.58c0.54,1.08 1,2.22 1.49,3.34a2,2 0,0 1,-0.78 2.29,10.33 10.33,0 0,1 -5,2.23 11.81,11.81 0,0 1,-4.59 -0.17,5.86 5.86,0 0,1 -4.32,-3.88 15.61,15.61 0,0 1,-0.94 -5.57c0,-9.35 0,-18.69 0,-28a2.28,2.28 0,0 1,0.54 -1.62,1.76 1.76,0 0,1 1.41,-0.67h4.19a2.06,2.06 0,0 1,2.29 2.29v4.25Z"
android:fillColor="#fff"/>
<path
android:pathData="M232.28,228.33A5.52,5.52 0,0 1,238 234a5.67,5.67 0,0 1,-5.74 5.74,5.76 5.76,0 0,1 -5.73,-5.77v-0.07A5.65,5.65 0,0 1,232.28 228.33Z"
android:fillColor="#fff"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
android:id="@+id/fragment_container"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".splash.SplashActivity">
</androidx.constraintlayout.widget.ConstraintLayout>
7 changes: 7 additions & 0 deletions app/src/main/res/layout/fragment_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
5 changes: 5 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="fade_in_duration">1000</integer>
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
<integer name="fade_out_duration">1000</integer>
</resources>
21 changes: 21 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,25 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="OppiaThemeWithoutActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="SplashScreenTheme" parent="OppiaThemeWithoutActionBar">
<item name="android:windowBackground">@drawable/bg_splash</item>
<item name="android:windowAnimationStyle">@style/Animation.Activity</item>
<item name="android:backgroundDimEnabled">true</item>
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
</style>

<!-- Base style for animations. This style specifies no animations. -->
<style name="Animation" />

<!-- Standard animations for a full-screen window or activity. -->
<style name="Animation.Activity">
veena14cs marked this conversation as resolved.
Show resolved Hide resolved
<item name="android:activityOpenEnterAnimation">@anim/fade_in</item>
<item name="android:activityOpenExitAnimation">@anim/fade_out</item>
</style>
</resources>