diff --git a/.idea/misc.xml b/.idea/misc.xml index 3adce03..b0a270f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -30,4 +30,7 @@ + + \ No newline at end of file diff --git a/FDAndroidClient/FDAndroidClient.iml b/FDAndroidClient/FDAndroidClient.iml index bd6c60f..5347b4c 100644 --- a/FDAndroidClient/FDAndroidClient.iml +++ b/FDAndroidClient/FDAndroidClient.iml @@ -62,13 +62,6 @@ - - - - - - - @@ -76,34 +69,26 @@ - + + + + + + + - - - - - - - - - - - - - - - + @@ -111,6 +96,7 @@ + @@ -129,5 +115,6 @@ + \ No newline at end of file diff --git a/FDAndroidClient/build.gradle b/FDAndroidClient/build.gradle index d0d3478..07d4c7e 100644 --- a/FDAndroidClient/build.gradle +++ b/FDAndroidClient/build.gradle @@ -57,9 +57,10 @@ dependencies { annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion" compile "com.squareup.retrofit2:retrofit:$retrofitVersion" compile "com.squareup.retrofit2:converter-gson:$retrofitVersion" - compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0' compile group: 'io.reactivex', name: 'rxandroid', version: '1.2.1' + compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0' compile 'de.greenrobot:eventbus:2.2.1' compile 'com.android.support:design:26.+' + compile 'com.android.support.constraint:constraint-layout:1.0.2' } diff --git a/FDAndroidClient/src/main/AndroidManifest.xml b/FDAndroidClient/src/main/AndroidManifest.xml index cf2a709..4ea9945 100644 --- a/FDAndroidClient/src/main/AndroidManifest.xml +++ b/FDAndroidClient/src/main/AndroidManifest.xml @@ -57,7 +57,9 @@ + android:label="@string/title_activity_login" /> + \ No newline at end of file diff --git a/FDAndroidClient/src/main/java/com/freedomotic/freedomotic/activity/SplashScreen.java b/FDAndroidClient/src/main/java/com/freedomotic/freedomotic/activity/SplashScreen.java new file mode 100644 index 0000000..a5a00ed --- /dev/null +++ b/FDAndroidClient/src/main/java/com/freedomotic/freedomotic/activity/SplashScreen.java @@ -0,0 +1,78 @@ +/* + * 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 + * . + */ + +package com.freedomotic.freedomotic.activity; + +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Handler; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.ProgressBar; +import android.widget.Toast; + +import com.freedomotic.freedomotic.R; + +import butterknife.BindView; + +public class SplashScreen extends BaseActivity { + private final int SPLASH_DISPLAY_LENGTH = 5000; + private Handler progressBarbHandler = new Handler(); + public static int progressBarStatus=0; + @BindView(R.id.splash_progress_bar) ProgressBar progressBar; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_splash_screen); + progressBar.setVisibility(View.INVISIBLE); + //This method to be used when no progress is to be done or splash screen is just for display purpose only + new Handler().postDelayed(new Runnable(){ + @Override + public void run() { + //Add intent to which activity to go from splash screen + } + }, SPLASH_DISPLAY_LENGTH); + //If data loading threads are present or actual method for data loading +// progressBar.setVisibility(View.VISIBLE); +// progressBar.setMax(100); +// progressBar.setProgress(0); +// new Thread(new Runnable() { +// @Override +// public void run() { +// while (progressBarStatus < 100) { +// //call methodFor running thread process with return type int +// //progressBarStatus=method() +// progressBarStatus=progressBarStatus+1; +// } +// progressBarbHandler.post(new Runnable() { +// @Override +// public void run() { +// progressBar.setProgress(progressBarStatus); +// } +// }); +// } +// }); + } + + @Override + protected void onStart() { + super.onStart(); + } +} diff --git a/FDAndroidClient/src/main/res/layout/activity_splash_screen.xml b/FDAndroidClient/src/main/res/layout/activity_splash_screen.xml new file mode 100644 index 0000000..f589bbe --- /dev/null +++ b/FDAndroidClient/src/main/res/layout/activity_splash_screen.xml @@ -0,0 +1,53 @@ + + + + + + + diff --git a/FDAndroidClient/src/main/res/values/styles.xml b/FDAndroidClient/src/main/res/values/styles.xml index a38b3f0..2acc660 100644 --- a/FDAndroidClient/src/main/res/values/styles.xml +++ b/FDAndroidClient/src/main/res/values/styles.xml @@ -26,5 +26,8 @@ + diff --git a/fd-android-client.iml b/fd-android-client.iml index 14ddc46..bc1b7d4 100644 --- a/fd-android-client.iml +++ b/fd-android-client.iml @@ -13,7 +13,7 @@ - + \ No newline at end of file