Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/src/main/java/me/icxd/bookshelve/activity/SplashScreenActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package me.icxd.bookshelve.activity; | ||
|
||
import android.content.Intent; | ||
import android.os.Handler; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.WindowManager; | ||
|
||
import me.icxd.bookshelve.R; | ||
|
||
public class SplashScreenActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_splash_screen); | ||
|
||
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,WindowManager.LayoutParams. FLAG_FULLSCREEN); | ||
|
||
new Handler().postDelayed(new Runnable() { | ||
public void run() { | ||
Intent mainIntent = new Intent(SplashScreenActivity.this, MainActivity.class); | ||
SplashScreenActivity.this.startActivity(mainIntent); | ||
SplashScreenActivity.this.finish(); | ||
} | ||
}, 2000); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout 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" | ||
android:background="@color/colorPrimary" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
tools:context="me.icxd.bookshelve.activity.SplashScreenActivity"> | ||
|
||
<ImageView | ||
android:layout_width="80dp" | ||
android:layout_height="80dp" | ||
android:src="@drawable/ic_import_contacts_white_48dp" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="20dp" | ||
android:text="书柜" | ||
android:textColor="#FFFFFF" | ||
android:textSize="24sp" /> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters