Skip to content

Commit 5cab30b

Browse files
reformat for 120 characters line length
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent fc4ed90 commit 5cab30b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ public void colorNavigationViewItemText(@NonNull TextView view) {
8888
* @deprecated should be replaced by {@link MaterialViewThemeUtils#themeToolbar(MaterialToolbar)}.
8989
*/
9090
@Deprecated(forRemoval = true)
91-
public void applyBrandToPrimaryToolbar(@NonNull AppBarLayout appBarLayout, @NonNull Toolbar toolbar, @ColorInt int color) {
91+
public void applyBrandToPrimaryToolbar(@NonNull AppBarLayout appBarLayout,
92+
@NonNull Toolbar toolbar,
93+
@ColorInt int color) {
9294
// FIXME Workaround for https://github.com/nextcloud/notes-android/issues/889
9395
appBarLayout.setBackgroundColor(ContextCompat.getColor(appBarLayout.getContext(), R.color.primary));
9496

@@ -118,7 +120,10 @@ public void colorLayerDrawable(@NonNull LayerDrawable check, @IdRes int areaToCo
118120
}
119121

120122
@ColorInt
121-
public int getTextHighlightBackgroundColor(@NonNull Context context, @ColorInt int mainColor, @ColorInt int colorPrimary, @ColorInt int colorAccent) {
123+
public int getTextHighlightBackgroundColor(@NonNull Context context,
124+
@ColorInt int mainColor,
125+
@ColorInt int colorPrimary,
126+
@ColorInt int colorAccent) {
122127
if (isDarkMode(context)) { // Dark background
123128
if (ColorUtil.INSTANCE.isColorDark(mainColor)) { // Dark brand color
124129
if (NotesColorUtil.contrastRatioIsSufficient(mainColor, colorPrimary)) { // But also dark text
@@ -162,7 +167,8 @@ public void themeSearchCardView(@NonNull MaterialCardView searchBarWrapper) {
162167
}
163168

164169
/**
165-
* @deprecated Should be replaced with {@link com.google.android.material.search.SearchBar} or {@link MaterialViewThemeUtils#themeToolbar(MaterialToolbar)}
170+
* @deprecated Should be replaced with {@link com.google.android.material.search.SearchBar} or
171+
* {@link MaterialViewThemeUtils#themeToolbar(MaterialToolbar)}
166172
*/
167173
@Deprecated
168174
public void themeSearchToolbar(@NonNull MaterialToolbar toolbar) {
@@ -181,7 +187,8 @@ public void themeSearchToolbar(@NonNull MaterialToolbar toolbar) {
181187
public void themeToolbarSearchView(@NonNull SearchView searchView) {
182188
withScheme(searchView, scheme -> {
183189
// hacky as no default way is provided
184-
final var editText = (SearchView.SearchAutoComplete) searchView.findViewById(androidx.appcompat.R.id.search_src_text);
190+
final var editText = (SearchView.SearchAutoComplete) searchView
191+
.findViewById(androidx.appcompat.R.id.search_src_text);
185192
final var closeButton = (ImageView) searchView.findViewById(androidx.appcompat.R.id.search_close_btn);
186193
final var searchButton = (ImageView) searchView.findViewById(androidx.appcompat.R.id.search_button);
187194
editText.setHintTextColor(scheme.getOnSurfaceVariant());

0 commit comments

Comments
 (0)