From b572d110d82fc7aeba94f6cfafc0dfe7bdfdb756 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 2 Aug 2019 17:15:57 +0200 Subject: [PATCH] remove splash on other activities --- .../androidaps/activities/AgreementActivity.java | 4 ++-- .../activities/HistoryBrowseActivity.java | 4 ++-- .../androidaps/activities/NoSplashActivity.kt | 13 +++++++++++++ .../androidaps/activities/PreferencesActivity.java | 1 + .../androidaps/activities/TDDStatsActivity.java | 4 ++-- 5 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 app/src/main/java/info/nightscout/androidaps/activities/NoSplashActivity.kt diff --git a/app/src/main/java/info/nightscout/androidaps/activities/AgreementActivity.java b/app/src/main/java/info/nightscout/androidaps/activities/AgreementActivity.java index 32352e1371..d3792bbad5 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/AgreementActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/activities/AgreementActivity.java @@ -11,13 +11,13 @@ import info.nightscout.androidaps.MainActivity; import info.nightscout.androidaps.R; import info.nightscout.androidaps.utils.SP; -public class AgreementActivity extends Activity { +public class AgreementActivity extends NoSplashActivity { boolean IUnderstand; CheckBox agreeCheckBox; Button saveButton; @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_agreement); IUnderstand = SP.getBoolean(R.string.key_i_understand, false); diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.java b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.java index a076608ed2..7914c0508d 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.java @@ -45,7 +45,7 @@ import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.T; -public class HistoryBrowseActivity extends AppCompatActivity { +public class HistoryBrowseActivity extends NoSplashActivity { private static Logger log = LoggerFactory.getLogger(HistoryBrowseActivity.class); @@ -82,7 +82,7 @@ public class HistoryBrowseActivity extends AppCompatActivity { } @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_historybrowse); diff --git a/app/src/main/java/info/nightscout/androidaps/activities/NoSplashActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/NoSplashActivity.kt new file mode 100644 index 0000000000..0b7af2bd1d --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/activities/NoSplashActivity.kt @@ -0,0 +1,13 @@ +package info.nightscout.androidaps.activities + +import android.app.Activity +import android.os.Bundle + +import info.nightscout.androidaps.R + +open class NoSplashActivity : Activity() { + public override fun onCreate(savedInstanceState: Bundle?) { + setTheme(R.style.AppTheme_NoActionBar) + super.onCreate(savedInstanceState) + } +} diff --git a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java index 7b8a01c843..c5539f29d2 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.java @@ -56,6 +56,7 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre @Override protected void onCreate(Bundle savedInstanceState) { + setTheme(R.style.AppTheme_NoActionBar); super.onCreate(savedInstanceState); myPreferenceFragment = new MyPreferenceFragment(); Bundle args = new Bundle(); diff --git a/app/src/main/java/info/nightscout/androidaps/activities/TDDStatsActivity.java b/app/src/main/java/info/nightscout/androidaps/activities/TDDStatsActivity.java index 832ca2ad85..487def0241 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/TDDStatsActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/activities/TDDStatsActivity.java @@ -52,7 +52,7 @@ import info.nightscout.androidaps.utils.DecimalFormatter; import info.nightscout.androidaps.utils.SP; import info.nightscout.androidaps.utils.SafeParse; -public class TDDStatsActivity extends Activity { +public class TDDStatsActivity extends NoSplashActivity { private static Logger log = LoggerFactory.getLogger(TDDStatsActivity.class); TextView statusView, statsMessage, totalBaseBasal2; @@ -99,7 +99,7 @@ public class TDDStatsActivity extends Activity { } @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.danar_statsactivity); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);