Skip to content

Commit

Permalink
Themed launch screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Tesla committed Feb 22, 2017
1 parent ad6bab1 commit 9586e07
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 25 deletions.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:theme="@style/LaunchTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/moose/com/ac/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ public void onReceive(Context context, Intent intent) {
}
};

@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
}

@Override
protected void onInitView(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color, preferably the same as your normal theme -->
<item android:drawable="@android:color/white"/>
<!-- Your product logo - 144dp color version of your app icon -->
<item>
<bitmap
android:src="@mipmap/ic_launcher"
android:gravity="center"/>
</item>
</layer-list>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_quote_comment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:text="发送"
android:text="@string/send_comment"
android:textColor="@color/colorPrimary" />
</RelativeLayout>

Expand Down
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.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 modified app/src/main/res/mipmap-mdpi/ic_launcher.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 modified app/src/main/res/mipmap-xhdpi/ic_launcher.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 modified app/src/main/res/mipmap-xxhdpi/ic_launcher.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/mipmap/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions app/src/main/res/values-v19/styles.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/res/values-v21/styles.xml

This file was deleted.

5 changes: 5 additions & 0 deletions app/src/main/res/values-v23/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<item name="android:navigationBarColor">@color/colorPrimary</item>
</style>

<style name="LaunchTheme" parent="AppTheme">
<item name="android:windowBackground" >@drawable/launch_background</item>
</style>


<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorPrimary">@color/colorPrimary</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@
<item name="android:windowEnterAnimation">@anim/slide_in_from_bottom</item>
<item name="android:windowExitAnimation">@anim/slide_out_to_bottom</item>
</style>
</resources>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<item name="android:textColorSecondary">@color/md_grey_500</item>
</style>

<style name="LaunchTheme" parent="AppTheme">
<item name="android:windowBackground" >@drawable/launch_background</item>
</style>

<style name="NightTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimaryDark" tools:ignore="NewApi">@color/md_black</item>
<item name="statusBarColor">@color/md_black</item>
Expand Down

0 comments on commit 9586e07

Please sign in to comment.