Material3: less customizing for night

mode.
This commit is contained in:
Dennis Guse
2023-06-19 23:11:28 +02:00
parent 5c17c8ffcf
commit a431850793
10 changed files with 27 additions and 40 deletions
@@ -550,7 +550,7 @@ public class TrackListActivity extends AbstractTrackDeleteActivity implements Co
private void setFloatButton() {
viewBinding.trackListFabAction.setImageResource(recordingStatus.isRecording() ? R.drawable.ic_baseline_stop_24 : R.drawable.ic_baseline_record_24);
viewBinding.trackListFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, recordingStatus.isRecording() ? R.color.opentracks_secondary_color : R.color.red_dark));
viewBinding.trackListFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, recordingStatus.isRecording() ? R.color.opentracks : R.color.red_dark));
}
private void onRecordingStatusChanged(RecordingStatus status) {
@@ -133,8 +133,8 @@ public class TrackRecordingActivity extends AbstractActivity implements ChooseAc
}
viewBinding.trackRecordingFabAction.setImageResource(R.drawable.ic_baseline_stop_24);
viewBinding.trackRecordingFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, R.color.opentracks_secondary_color));
viewBinding.trackRecordingFabAction.setBackgroundColor(ContextCompat.getColor(this, R.color.opentracks_secondary_color));
viewBinding.trackRecordingFabAction.setBackgroundTintList(ContextCompat.getColorStateList(this, R.color.opentracks));
viewBinding.trackRecordingFabAction.setBackgroundColor(ContextCompat.getColor(this, R.color.opentracks));
viewBinding.trackRecordingFabAction.setOnLongClickListener((view) -> {
ActivityUtils.vibrate(this, 1000);
trackRecordingServiceConnection.stopRecording(TrackRecordingActivity.this);
@@ -78,7 +78,7 @@ class ChooseActivityTypeImageAdapter extends BaseAdapter {
}
if (position == selected) {
imageView.setBackgroundColor(ContextCompat.getColor(parent.getContext(), R.color.opentracks_secondary_color));
imageView.setBackgroundColor(ContextCompat.getColor(parent.getContext(), R.color.opentracks));
} else {
imageView.setBackgroundColor(Color.TRANSPARENT);
}
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/opentracks_secondary_transparent" android:state_activated="true" />
<item android:drawable="@color/opentracks_transparent" android:state_activated="true" />
<item android:drawable="@android:color/transparent" />
</selector>
+7 -7
View File
@@ -7,17 +7,17 @@
android:pathData="M62.5,62.5m-59.984,0a59.984,59.984 0,1 1,119.968 0a59.984,59.984 0,1 1,-119.968 0"
android:strokeWidth="5.03185"
android:fillColor="@android:color/transparent"
android:strokeColor="@color/opentracks_secondary_color"/>
<path
android:pathData="M62.5,62.5m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"
android:strokeWidth="1.0"
android:fillColor="@color/opentracks_secondary_color"
android:strokeColor="@color/opentracks_secondary_color"/>
android:strokeColor="@color/opentracks" />
<path
android:pathData="M62.5,62.5m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"
android:strokeWidth="1.0"
android:fillColor="@color/opentracks"
android:strokeColor="@color/opentracks" />
<path
android:pathData="M38.62,63.866 L52.899,78.144 86.38,44.664"
android:strokeLineJoin="miter"
android:strokeWidth="6.2"
android:fillColor="@color/opentracks_secondary_color"
android:fillColor="@color/opentracks"
android:strokeColor="@android:color/white"
android:strokeLineCap="butt"/>
</vector>
+2 -2
View File
@@ -7,11 +7,11 @@
android:pathData="M62.5,62.5m-59.984,0a59.984,59.984 0,1 1,119.968 0a59.984,59.984 0,1 1,-119.968 0"
android:strokeWidth="5.03185"
android:fillColor="@android:color/transparent"
android:strokeColor="@color/opentracks_secondary_color"/>
android:strokeColor="@color/opentracks" />
<path
android:pathData="M62.5,62.5m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"
android:strokeWidth="6.91728"
android:fillColor="@color/opentracks_secondary_color"
android:fillColor="@color/opentracks"
android:strokeColor="@android:color/transparent"/>
<path
android:pathData="M87.6,62.5 L67.991,73.822 48.381,85.143l-0,-22.643 0,-22.643 19.61,11.322z"
+1
View File
@@ -128,6 +128,7 @@ limitations under the License.
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/track_list_fab_action"
android:tint="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/image_record"
+7 -19
View File
@@ -1,26 +1,17 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="ThemeCustom" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/opentracks_secondary_color</item>
<item name="colorOnPrimary">@android:color/white</item>
<item name="colorPrimary">@color/opentracks</item>
<item name="colorSecondary">@color/opentracks</item>
<item name="colorSecondary">@color/opentracks_secondary_color</item>
<item name="colorSecondaryVariant">@color/opentracks_secondary_color</item>
<item name="colorOnSecondary">@color/opentracks_on_secondary_color</item>
<item name="android:statusBarColor">@android:color/black</item>
<item name="android:colorBackground">@android:color/black</item>
<item name="colorOnBackground">@android:color/white</item>
<item name="android:activatedBackgroundIndicator">@drawable/activated_background</item>
<item name="android:statusBarColor">@color/oled_friendly</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:navigationBarColor">@color/oled_friendly</item>
<item name="bottomAppBarStyle">@style/Widget.OpenTracks.BottomAppBar</item>
<item name="floatingActionButtonStyle">@style/Widget.OpenTracks.FloatingActionButton</item>
<item name="android:windowActionModeOverlay">true</item>
<item name="windowActionModeOverlay">true</item>
</style>
<style name="Widget.OpenTracks.BottomAppBar" parent="Widget.Material3.BottomAppBar">
@@ -28,10 +19,7 @@
</style>
<style name="ThemeOverlay.OpenTracks.BottomAppBar" parent="">
<item name="colorPrimary">@android:color/black</item>
<item name="colorAccent">@android:color/white</item>
<!-- <item name="android:drawableTint">@android:color/white</item>-->
<item name="colorPrimary">@color/oled_friendly</item>
</style>
</resources>
+3 -6
View File
@@ -14,13 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<color name="oled_friendly">@android:color/black</color>
<!-- Brand colors -->
<color name="opentracks_primary_color">#344955</color>
<color name="opentracks_primary_variant_color">#232f34</color>
<color name="opentracks_on_primary_color">@android:color/white</color>
<color name="opentracks_secondary_color">#FF6D00</color>
<color name="opentracks_secondary_transparent">#55FF6D00</color>
<color name="opentracks_on_secondary_color">@android:color/white</color>
<color name="opentracks">#FF6D00</color>
<color name="opentracks_transparent">#55FF6D00</color> <!-- TODO REMOVE -->
<!-- Chart colors -->
<color name="chart_cadence_border">#FFF128F3</color> <!-- pink -->
+2 -1
View File
@@ -16,7 +16,8 @@ limitations under the License.
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="ThemeCustom" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/opentracks_secondary_color</item>
<item name="colorPrimary">@color/opentracks</item>
<item name="colorSecondary">@color/opentracks</item>
<item name="android:statusBarColor">?attr/colorSurfaceBright</item>
<item name="android:windowLightStatusBar">true</item>