Skip to content

Commit

Permalink
Fixes freedomotic#2: Merge branch 'add_splash_screen'
Browse files Browse the repository at this point in the history
  • Loading branch information
paulnunezm committed Oct 24, 2017
2 parents aec1cc8 + a0bd797 commit 0c8c4da
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 13 deletions.
12 changes: 7 additions & 5 deletions FDAndroidClient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
applicationId "com.freedomotic.freedomotic"
minSdkVersion 17
targetSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand All @@ -44,10 +43,13 @@ android {
}
}

ext.supportVersion = "26.0.2"

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// You must install or update the Support Repository through the SDK manager to use this dependency.
compile 'com.android.support:support-v4:19.+'
compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:support-v4:$supportVersion"

compile 'com.squareup.retrofit:retrofit:1.6.1'

Expand Down
4 changes: 2 additions & 2 deletions FDAndroidClient/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
android:theme="@style/AppTheme">
<activity
android:name=".objectListActivity"
android:label="@string/app_name">
android:label="@string/app_name"
android:theme="@style/AppTheme.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

package com.freedomotic.freedomotic;

import android.app.Activity;
import android.support.v7.app.AppCompatActivity;


/**
* Base activity to provide the common struture for all activities
*/
public abstract class BaseActivity extends Activity {
public abstract class BaseActivity extends AppCompatActivity {

@Override
protected void onStart() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class objectListActivity extends BaseActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
// Change the theme to remove the splash screen as soon this is created.
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_object_list);

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions FDAndroidClient/src/main/res/drawable/splash_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009-2017 Freedomotic team http://freedomotic.com
~
~ This file is part of Freedomotic
~
~ This Program is free software; you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by the Free Software
~ Foundation; either version 2, or (at your option) 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 General Public License for more
~ details.
~
~ You should have received a copy of the GNU General Public License along with
~ Freedomotic; see the file COPYING. If not, see
~ <http://www.gnu.org/licenses/>.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/white"/>
</item>
<item
android:drawable="@drawable/freedomatic_logo"
android:gravity="center"/>
</layer-list>
23 changes: 23 additions & 0 deletions FDAndroidClient/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2009-2017 Freedomotic team http://freedomotic.com
~
~ This file is part of Freedomotic
~
~ This Program is free software; you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by the Free Software
~ Foundation; either version 2, or (at your option) 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 General Public License for more
~ details.
~
~ You should have received a copy of the GNU General Public License along with
~ Freedomotic; see the file COPYING. If not, see
~ <http://www.gnu.org/licenses/>.
-->

<resources>
<color name="white">#fff</color>
</resources>
7 changes: 5 additions & 2 deletions FDAndroidClient/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
</style>

<style name="AppTheme.SplashScreen" parent="AppTheme">
<item name="android:windowBackground">@drawable/splash_screen</item>
</style>

</resources>
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
classpath 'com.android.tools.build:gradle:2.3.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -34,5 +34,8 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-3.3-all.zip

0 comments on commit 0c8c4da

Please sign in to comment.