Skip to content

Commit

Permalink
Fix colors in setting fragments, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
krlvm committed Mar 29, 2021
1 parent 24a264d commit c906cb5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.InputType;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -148,13 +145,8 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
final MenuItem restoreItem = menu
.add(Menu.NONE, MENU_ITEM_RESTORE_ID, Menu.NONE, R.string.restore_defaults);
restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
final Drawable icon = AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore);
if (icon != null) {
icon.mutate();
icon.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
}
restoreItem.setIcon(icon);
restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
final MenuItem restoreItem = menu.add(Menu.NONE, MENU_ITEM_RESTORE_ID, Menu.NONE,
R.string.restore_defaults);
restoreItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);

restoreItem.setIcon(AppCompatResources.getDrawable(requireContext(),
R.drawable.ic_settings_backup_restore));
}
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/res/drawable-night/ic_settings_backup_restore.xml

This file was deleted.

1 change: 1 addition & 0 deletions app/src/main/res/drawable/ic_settings_backup_restore.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#FFFFFF"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_instance_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:tint="@color/white"
app:backgroundTint="?attr/colorPrimary"
app:fabSize="auto"
app:srcCompat="@drawable/ic_add" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<!-- Base Theme -->
<style name="Base.V19" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="floatingActionButtonStyle">@style/FloatingActionButtonTheme</item>
<item name="toolbarSearchColor">@color/white</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
</style>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/styles_misc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
<item name="android:textColor">@color/white_secondary</item>
</style>

<style name="FloatingActionButtonTheme" parent="Widget.Design.FloatingActionButton">
<item name="tint">@color/white</item>
</style>

<style name="DarkPopupMenu" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>

<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
Expand Down

0 comments on commit c906cb5

Please sign in to comment.