diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 977b992..3eb2bee 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,7 +31,7 @@ android:supportsRtl="true" android:theme="@style/AppTheme"> @@ -39,6 +39,11 @@ + + + diff --git a/app/src/main/java/com/willowtreeapps/spurceexampleapp/SplashActivity.java b/app/src/main/java/com/willowtreeapps/spurceexampleapp/SplashActivity.java new file mode 100644 index 0000000..8473f51 --- /dev/null +++ b/app/src/main/java/com/willowtreeapps/spurceexampleapp/SplashActivity.java @@ -0,0 +1,57 @@ +/* + * Spruce + * + * Copyright (c) 2017 WillowTree, Inc. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +package com.willowtreeapps.spurceexampleapp; + +import android.content.Intent; +import android.os.Bundle; +import android.os.Handler; +import android.support.annotation.Nullable; +import android.support.v4.content.ContextCompat; +import android.support.v7.app.AppCompatActivity; +import android.widget.ImageView; + +public class SplashActivity extends AppCompatActivity { + + private static int SPLASH_TIMEOUT = 2000; + private ImageView logoImageView; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_splash); + + logoImageView = (ImageView) findViewById(R.id.ivLogo); + logoImageView.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.spruce_logo)); + + Handler handler = new Handler(); + handler.postDelayed(new Runnable() { + @Override + public void run() { + startActivity(new Intent(SplashActivity.this, SpruceActivity.class)); + finish(); + } + }, SPLASH_TIMEOUT); + + } + +} diff --git a/app/src/main/res/drawable-hdpi/spruce_logo.png b/app/src/main/res/drawable-hdpi/spruce_logo.png new file mode 100644 index 0000000..72452d7 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/spruce_logo.png differ diff --git a/app/src/main/res/drawable-mdpi/spruce_logo.png b/app/src/main/res/drawable-mdpi/spruce_logo.png new file mode 100644 index 0000000..0daf429 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/spruce_logo.png differ diff --git a/app/src/main/res/drawable-xhdpi/spruce_logo.png b/app/src/main/res/drawable-xhdpi/spruce_logo.png new file mode 100644 index 0000000..8a7edb8 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/spruce_logo.png differ diff --git a/app/src/main/res/drawable-xxhdpi/spruce_logo.png b/app/src/main/res/drawable-xxhdpi/spruce_logo.png new file mode 100644 index 0000000..ebc6c04 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/spruce_logo.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/spruce_logo.png b/app/src/main/res/drawable-xxxhdpi/spruce_logo.png new file mode 100644 index 0000000..d07b0f9 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/spruce_logo.png differ diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml new file mode 100644 index 0000000..db17626 --- /dev/null +++ b/app/src/main/res/layout/activity_splash.xml @@ -0,0 +1,38 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index aa568ee..f0351bd 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -24,4 +24,5 @@ 16dp 16dp + 96dp