Skip to content

Commit

Permalink
added logo, inverted background
Browse files Browse the repository at this point in the history
  • Loading branch information
teddywilson committed Jul 11, 2017
1 parent 98bd12b commit 5618e84
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@
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
Expand All @@ -45,6 +51,7 @@ public void run() {
finish();
}
}, SPLASH_TIMEOUT);

}

}
Binary file added app/src/main/res/drawable-hdpi/spruce_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/spruce_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/spruce_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/spruce_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/recycler_background"
android:background="@color/colorPrimary"
tools:ignore="ContentDescription|RtlHardcoded,Overdraw">

<ImageView
android:id="@+id/ivLogo"
android:layout_width="@dimen/logo_size_splash"
android:layout_height="@dimen/logo_size_splash"
android:layout_centerInParent="true"
android:src="@mipmap/ic_launcher"
tools:ignore="ContentDescription" />

</RelativeLayout>

0 comments on commit 5618e84

Please sign in to comment.