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

Added a splash screen #2448

Merged
merged 4 commits into from
Apr 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
android:name=".ui.activity.FileDisplayActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize"
android:theme="@style/Theme.ownCloud.Toolbar.Drawer">
android:theme="@style/Theme.ownCloud.Launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ public class FileDisplayActivity extends HookActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start");

// Set the default theme to replace the launch screen theme.
setTheme(R.style.Theme_ownCloud_Toolbar_Drawer);
super.onCreate(savedInstanceState); // this calls onAccountChanged() when ownCloud Account
// is valid

Expand Down
31 changes: 31 additions & 0 deletions src/main/res/drawable/launch_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Nextcloud Android client application

Copyright (C) 2018 Edvard Holst

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
License as published by the Free Software Foundation; either
version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE for more details.

You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:drawable="@color/primary"/>

<item>
<bitmap
android:gravity="center"
android:src="@drawable/logo" />
</item>

</layer-list>
6 changes: 6 additions & 0 deletions src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
<item name="windowActionBarOverlay">true</item>
</style>

<!-- Launch screen -->
<style name="Theme.ownCloud.Launcher">
<item name="android:windowBackground">@drawable/launch_screen</item>
</style>


<!-- Progress bar -->
<style name="Widget.ownCloud.TopProgressBar" parent="style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/actionbar_progress_horizontal</item>
Expand Down