Skip to content

Commit ac148eb

Browse files
Merge pull request #2721 from nextcloud/style/noid/searchbar
🎨 Update searchbar theming to m3
2 parents 6e03d68 + d9c0dd6 commit ac148eb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

app/src/main/java/it/niedermann/owncloud/notes/branding/NotesViewThemeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public int getTextHighlightBackgroundColor(@NonNull Context context,
171171
@Deprecated
172172
public void themeSearchCardView(@NonNull MaterialCardView searchBarWrapper) {
173173
withScheme(searchBarWrapper, scheme -> {
174-
searchBarWrapper.setBackgroundTintList(ColorStateList.valueOf(dynamicColor.surface().getArgb(scheme)));
174+
searchBarWrapper.setBackgroundTintList(ColorStateList.valueOf(dynamicColor.surfaceContainerHigh().getArgb(scheme)));
175175
return searchBarWrapper;
176176
});
177177
}

app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import static android.view.View.GONE;
1212
import static android.view.View.VISIBLE;
1313
import static com.nextcloud.android.common.ui.util.PlatformThemeUtil.isDarkMode;
14+
import static it.niedermann.owncloud.notes.NotesApplication.brandingUtil;
1415
import static it.niedermann.owncloud.notes.NotesApplication.isGridViewEnabled;
1516
import static it.niedermann.owncloud.notes.shared.model.ENavigationCategoryType.DEFAULT_CATEGORY;
1617
import static it.niedermann.owncloud.notes.shared.model.ENavigationCategoryType.FAVORITES;
@@ -603,6 +604,7 @@ public void applyBrand(int color) {
603604
util.platform.colorNavigationView(binding.navigationView);
604605
util.material.themeFAB(activityBinding.fabCreate);
605606
util.notes.themeSearchCardView(binding.activityNotesListView.searchBarWrapper);
607+
util.platform.colorTextView(binding.activityNotesListView.searchText, ColorRole.ON_SURFACE_VARIANT);
606608
util.notes.themeSearchToolbar(binding.activityNotesListView.searchToolbar);
607609
util.notes.themeToolbarSearchView(binding.activityNotesListView.searchView);
608610

@@ -658,6 +660,7 @@ private void updateSortMethodIcon(CategorySortingMethod method) {
658660
break;
659661
default: throw new IllegalStateException("Unknown method: " + method.name());
660662
}
663+
brandingUtil().platform.colorImageView(activityBinding.sortingMethod, ColorRole.ON_SURFACE);
661664
}
662665

663666
@Override

app/src/main/res/layout/activity_notes_list_view.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
android:layout_marginVertical="@dimen/spacer_1hx"
3737
app:cardBackgroundColor="@color/appbar"
3838
app:cardCornerRadius="@dimen/spacer_4x"
39-
app:cardElevation="2dp"
4039
app:strokeWidth="0dp">
4140

4241
<com.google.android.material.appbar.MaterialToolbar

0 commit comments

Comments
 (0)