Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
Mark fixes, removed some obsolete themes
Browse files Browse the repository at this point in the history
  • Loading branch information
jilleb committed Nov 23, 2018
1 parent 1fd64fc commit 40f8a6d
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 91 deletions.
12 changes: 10 additions & 2 deletions app/src/main/java/com/mqbcoding/stats/DashboardFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,16 @@ public void onGlobalLayout() {
}

// show value of the ticks
// int tickNum = 3;
// int markColor = mClockLeft.getMarkColor();
// Log.i(TAG, "markcolor"+ markColor);
//
// if (markColor==-1){
// tickNum = 9;
// }

if (ticksOn) {
int tickNum = 5;
int tickNum = 9;

mClockLeft.setTickNumber(tickNum);
mClockLeft.setTextColor(Color.WHITE);
Expand Down Expand Up @@ -825,7 +833,7 @@ private void setupClock(String queryClock, Speedometer clock, TextView icon, Ray
case "test":
icon.setText("");
clock.setUnit(getString(R.string.testing));
clock.setMinMaxSpeed(-100, 200);
clock.setMinMaxSpeed(0, 360);
clock.setSpeedTextFormat(Gauge.FLOAT_FORMAT);
icon.setBackground(getContext().getDrawable(R.drawable.ic_measurement));
break;
Expand Down
16 changes: 4 additions & 12 deletions app/src/main/java/com/mqbcoding/stats/MainCarActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.View;

import com.google.android.apps.auto.sdk.CarActivity;
import com.google.android.apps.auto.sdk.CarUiController;
Expand All @@ -28,6 +29,7 @@ public class MainCarActivity extends CarActivity {
private static final String TAG = "MainCarActivity";



// static final String MENU_DEBUG_LOG = "log";
// static final String MENU_DEBUG_TEST_NOTIFICATION = "test_notification";
private static final String FRAGMENT_CARDATA = "cardata";
Expand Down Expand Up @@ -115,18 +117,12 @@ public void onCreate(Bundle bundle) {
case "Cupra Division":
setTheme(R.style.AppTheme_Cupra);
break;
case "Tesla":
setTheme(R.style.AppTheme_Tesla);
break;
case "Audi TT":
setTheme(R.style.AppTheme_AudiTT);
break;
case "Seat":
setTheme(R.style.AppTheme_Seat);
break;
case "MQB Coding":
setTheme(R.style.AppTheme_SeatMQB);
break;
case "Skoda":
setTheme(R.style.AppTheme_Skoda);
break;
Expand All @@ -145,15 +141,9 @@ public void onCreate(Bundle bundle) {
case "Audi Virtual Cockpit":
setTheme(R.style.AppTheme_AudiVC);
break;
case "Audi RS":
setTheme(R.style.AppTheme_AudiRS);
break;
case "Clubsport":
setTheme(R.style.AppTheme_Clubsport);
break;
case "Outrun":
setTheme(R.style.AppTheme_Outrun);
break;
case "Minimalistic":
setTheme(R.style.AppTheme_Minimalistic);
break;
Expand All @@ -166,6 +156,8 @@ public void onCreate(Bundle bundle) {

setContentView(R.layout.activity_car_main);




CarUiController carUiController = getCarUiController();
carUiController.getStatusBarController().showTitle();
Expand Down
Binary file not shown.
Binary file removed app/src/main/res/drawable/dial_background_audi2.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable/dial_background_minimal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed app/src/main/res/drawable/dial_background_tesla.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/needle_outrun.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/sw_background_audi2.png
Binary file not shown.
3 changes: 0 additions & 3 deletions app/src/main/res/layout/layout_dashboard_gauges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
android:id="@+id/icon_ClockLeft"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:alpha="1.0"
Expand All @@ -143,9 +142,7 @@
android:id="@+id/icon_ClockRight"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:alpha="1.0"
android:background="@drawable/ic_oil"
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@
<item>Seat</item>
<item>Seat Cupra</item>
<item>Cupra Division</item>
<item>MQB Coding</item>
<item>Skoda</item>
<item>Skoda vRS</item>
<item>Skoda ONE</item>
<item>Skoda Virtual Cockpit</item>
<item>Audi</item>
<item>Audi RS</item>
<item>Audi Virtual Cockpit</item>
<item>Audi TT</item>
<item>Tesla</item>
<item>Outrun</item>
<item>Minimalistic</item>
<item>Test</item>
</string-array>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
<attr name="themedStopWatchBackground" format="reference" />
<attr name="themedNeedleColor" format="reference" />


</resources>
96 changes: 27 additions & 69 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppTheme.Car" parent="@style/CarAppTheme" tools:ignore="PrivateResource"></style>

<style name="AppTheme.Seat" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_seat</item>
<item name="themedDialBackground">@drawable/dial_background_marks_seat</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_seat</item>
<item name="themedCarBackground">@drawable/background_incar_seat</item>
<item name="themedNeedle">@drawable/needle_seat</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/sw_background_seat</item>
<item name="themedNeedleColor">@color/yellow</item>
<item name="sv_withIndicatorLight">true</item>
<item name="sv_indicatorLightColor">@color/yellow</item>
<item name="sv_indicator">HalfLineIndicator</item>
<item name="sv_indicatorColor">#fecc00</item>
<item name="sv_indicatorWidth">4dp</item>
<item name="sv_tickPadding">20dp</item>
<item name="sv_tickPadding">15dp</item>
</style>
<style name="AppTheme.SeatCupra" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_seat2</item>
Expand Down Expand Up @@ -61,27 +62,12 @@
<item name="sv_indicatorWidth">4dp</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.SeatMQB" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_seatmqb</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty_seat2</item>
<item name="themedCarBackground">@drawable/background_incar_seat2</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedNeedle">@drawable/needle_seatmqb</item>
<item name="themedStopWatchBackground">@drawable/sw_background_seat2</item>
<item name="themedNeedleColor">@color/green</item>
<item name="sv_withIndicatorLight">true</item>
<item name="sv_indicatorLightColor">@color/green</item>
<item name="sv_indicator">HalfLineIndicator</item>
<item name="sv_indicatorColor">#00ff00</item>
<item name="sv_indicatorWidth">4dp</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.VolkswagenGTI" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty</item>
<item name="themedDialBackground">@drawable/dial_background_marks</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_marks_empty</item>
<item name="themedCarBackground">@drawable/background_incar_vw</item>
<item name="themedNeedle">@drawable/needle_vw_red</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/sw_background_vw</item>
<item name="themedNeedleColor">@color/red</item>
<item name="sv_tickPadding">20dp</item>
Expand All @@ -102,67 +88,48 @@
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.VolkswagenR" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty</item>
<item name="themedDialBackground">@drawable/dial_background_marks</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_marks_empty</item>
<item name="themedCarBackground">@drawable/background_incar_vw2</item>
<item name="themedNeedle">@drawable/needle_vw_blue</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/sw_background_vw</item>
<item name="themedNeedleColor">@color/blue</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.VolkswagenGTE" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty</item>
<item name="themedDialBackground">@drawable/dial_background_marks</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_marks_empty</item>
<item name="themedCarBackground">@drawable/background_incar_gte</item>
<item name="themedNeedle">@drawable/needle_vw_blue</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/sw_background_vw</item>
<item name="themedNeedleColor">@color/blue</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.Tesla" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_tesla</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_tesla</item>
<item name="themedCarBackground">@drawable/background_incar_tesla</item>
<item name="themedNeedle">@drawable/needle_tesla</item>
<item name="sv_markColor">@android:color/white</item>
<item name="themedStopWatchBackground">@drawable/sw_background_vw</item>
<item name="themedNeedleColor">@color/aqua</item>
<item name="sv_tickPadding">20dp</item>
</style>

<style name="AppTheme.AudiTT" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_audi4</item>
<item name="themedDialBackground">@drawable/dial_background_marks_audi4</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_audi4</item>
<item name="themedCarBackground">@drawable/background_incar_plain</item>
<item name="themedNeedle">@drawable/needle_audi4</item>
<item name="sv_markColor">@color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/dial_background_audi4</item>
<item name="themedNeedleColor">@color/red</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.Volkswagen" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty</item>
<item name="themedDialBackground">@drawable/dial_background_marks</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_marks_empty</item>
<item name="themedCarBackground">@drawable/background_incar_vw3</item>
<item name="themedNeedle">@drawable/needle_vw_white</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/sw_background_vw</item>
<item name="themedNeedleColor">@color/white</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.Outrun" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_outrun</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_outrun</item>
<item name="themedCarBackground">@drawable/background_incar_outrun</item>
<item name="themedNeedle">@drawable/needle_outrun</item>
<item name="sv_markColor">@android:color/white</item>
<item name="themedStopWatchBackground">@drawable/dial_background_outrun</item>
<item name="themedNeedleColor">@color/pink</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.Audi" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_audi</item>
<item name="themedDialBackground">@drawable/dial_background_marks_audi</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_audi</item>
<item name="themedCarBackground">@drawable/background_incar_vw3</item>
<item name="themedNeedle">@drawable/needle_audi_red</item>
Expand All @@ -172,25 +139,15 @@
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.AudiVC" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_audi3</item>
<item name="themedDialBackground">@drawable/dial_background_marks_audi3</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_audi3</item>
<item name="themedCarBackground">@drawable/background_incar_vw3</item>
<item name="themedNeedle">@drawable/needle_audi3</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/dial_background_audi3</item>
<item name="themedNeedleColor">@color/red</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.AudiRS" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_audi2</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_audi2</item>
<item name="themedCarBackground">@drawable/background_incar_vw3</item>
<item name="themedNeedle">@drawable/needle_audi_red</item>
<item name="sv_markColor">@android:color/white</item>
<item name="themedStopWatchBackground">@drawable/sw_background_audi2</item>
<item name="themedNeedleColor">@color/red</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.Clubsport" parent="AppTheme.Car">
<item name="themedDialBackground">@drawable/dial_background_vw2</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty_vw2</item>
Expand Down Expand Up @@ -235,20 +192,20 @@
</style>
<style name="AppTheme.SkodaVC" parent="AppTheme.Car">
<item name="themedCarBackground">@drawable/background_incar_black</item>
<item name="themedDialBackground">@drawable/dial_background_skoda3</item>
<item name="themedDialBackground">@drawable/dial_background_marks_skoda3</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_skoda3</item>
<item name="themedNeedle">@drawable/needle_skoda_2</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/dial_background_skoda3</item>
<item name="themedNeedleColor">@color/red</item>
<item name="sv_tickPadding">20dp</item>
</style>
<style name="AppTheme.SkodaOneApp" parent="AppTheme.Car">
<item name="themedCarBackground">@drawable/background_incar_skodaone</item>
<item name="themedDialBackground">@drawable/dial_background_empty_skodaone</item>
<item name="themedDialBackground">@drawable/dial_background_marks_skodaone</item>
<item name="themedEmptyDialBackground">@drawable/dial_background_empty_skodaone</item>
<item name="themedNeedle">@drawable/needle_mib2p</item>
<item name="sv_markColor">@android:color/white</item>
<item name="sv_markColor">@android:color/transparent</item>
<item name="themedStopWatchBackground">@drawable/sw_background_skodaone</item>
<item name="themedNeedleColor">@color/green</item>
<item name="sv_withIndicatorLight">true</item>
Expand Down Expand Up @@ -284,6 +241,7 @@
<item name="sv_indicatorWidth">3dp</item>
<item name="sv_tickPadding">15dp</item>
</style>

<style name="AppTheme.Car.Speedometer">
<item name="android:padding">25dp</item>
<item name="sv_lowSpeedPercent">85</item>
Expand Down

0 comments on commit 40f8a6d

Please sign in to comment.