diff --git a/app/src/main/java/com/mqbcoding/stats/MainCarActivity.java b/app/src/main/java/com/mqbcoding/stats/MainCarActivity.java index 366b85cb..17724949 100644 --- a/app/src/main/java/com/mqbcoding/stats/MainCarActivity.java +++ b/app/src/main/java/com/mqbcoding/stats/MainCarActivity.java @@ -1,6 +1,7 @@ package com.mqbcoding.stats; import android.content.SharedPreferences; +import android.graphics.Color; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; @@ -92,9 +93,14 @@ public void onCreate(Bundle bundle) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); String selectedTheme = sharedPreferences.getString("selectedTheme", "VW GTI"); + + //todo: make signal and other icons optional: + // Boolean signalOn = sharedPreferences.getBoolean("signalActive", false); + Log.d(TAG, "Selected theme: " + selectedTheme); setTheme(R.style.AppTheme_VolkswagenGTI); + switch (selectedTheme) { case "VW GTI": setTheme(R.style.AppTheme_VolkswagenGTI); @@ -155,8 +161,18 @@ public void onCreate(Bundle bundle) { Log.d(TAG, "Set theme: " + selectedTheme); setContentView(R.layout.activity_car_main); + // getWindow().getDecorView().setBackgroundColor(Color.WHITE); + + + // todo: make background user selectable: + // View someView = findViewById(R.id.fragment_container); + + // Find the root view + //View root = someView.getRootView(); + + // Set the background + //root.setBackground(someView.getContext().getDrawable(R.drawable.background_incar_outrun)); - CarUiController carUiController = getCarUiController(); @@ -164,6 +180,7 @@ public void onCreate(Bundle bundle) { //force night mode carUiController.getStatusBarController().setDayNightStyle(DayNightStyle.FORCE_NIGHT); + //todo: make these user options //hide all stuff you don't want to see on your screen // carUiController.getStatusBarController().hideBatteryLevel(); // carUiController.getStatusBarController().hideMicButton(); @@ -209,10 +226,10 @@ public void onCreate(Bundle bundle) { .setType(MenuItem.Type.ITEM) .build()); - mainMenu.addMenuItem(MENU_CARDATA, new MenuItem.Builder() - .setTitle(getString(R.string.activity_carstatus_title)) - .setType(MenuItem.Type.ITEM) - .build()); +// mainMenu.addMenuItem(MENU_CARDATA, new MenuItem.Builder() +// .setTitle(getString(R.string.activity_carstatus_title)) +// .setType(MenuItem.Type.ITEM) +// .build()); mainMenu.addMenuItem(MENU_STOPWATCH, new MenuItem.Builder() .setTitle(getString(R.string.activity_stopwatch_title)) diff --git a/app/src/main/java/com/mqbcoding/stats/StopwatchFragment.java b/app/src/main/java/com/mqbcoding/stats/StopwatchFragment.java index 74899ba7..26c7ac1d 100644 --- a/app/src/main/java/com/mqbcoding/stats/StopwatchFragment.java +++ b/app/src/main/java/com/mqbcoding/stats/StopwatchFragment.java @@ -128,6 +128,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, +//todo: make stopwatch clocks identical in styling, to the dashboardfragment mStopwatch = rootView.findViewById(R.id.dialMeasStopWatch); mStopwatch.setSpeedTextTypeface(typeface); diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 051c7ab8..04badb5a 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -110,13 +110,13 @@