diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-09-04 21:19:20 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-09-04 21:19:20 +0000 |
commit | ca42beeb17cfd1dbc99535809001b0316b79dd62 (patch) | |
tree | 399b97d588c2028c99d3e22f8f2ebb7916bd231a /app/src/main/java | |
parent | 478b2db4e583ff4577e421f1f115ef8d4d7626ef (diff) | |
download | infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.tar infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.tar.gz infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.tar.bz2 infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.tar.lz infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.tar.xz infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.tar.zst infinity-for-reddit-ca42beeb17cfd1dbc99535809001b0316b79dd62.zip |
Show a divider in SearchActivity.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java index 3073979e..abc09091 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java @@ -335,6 +335,7 @@ public class SearchActivity extends BaseActivity { if (searchOnlySubreddits || searchOnlyUsers || searchSubredditsAndUsers) { binding.subredditNameRelativeLayoutSearchActivity.setVisibility(View.GONE); + binding.dividerSearchActivity.setVisibility(View.GONE); } else { binding.subredditNameRelativeLayoutSearchActivity.setOnClickListener(view -> { Intent intent = new Intent(this, SubscribedThingListingActivity.class); @@ -396,7 +397,7 @@ public class SearchActivity extends BaseActivity { outRect.left = halfSpacing; outRect.right = spacing; } - outRect.bottom = spacing; + outRect.top = spacing; } }); @@ -409,8 +410,10 @@ public class SearchActivity extends BaseActivity { mRecentSearchQueryViewModel.getAllRecentSearchQueries().observe(this, recentSearchQueries -> { if (recentSearchQueries != null && !recentSearchQueries.isEmpty()) { + binding.dividerSearchActivity.setVisibility(View.VISIBLE); binding.deleteAllRecentSearchesButtonSearchActivity.setVisibility(View.VISIBLE); } else { + binding.dividerSearchActivity.setVisibility(View.GONE); binding.deleteAllRecentSearchesButtonSearchActivity.setVisibility(View.GONE); } adapter.setRecentSearchQueries(recentSearchQueries); @@ -498,8 +501,9 @@ public class SearchActivity extends BaseActivity { binding.linkHandlerImageViewSearchActivity.setColorFilter(mCustomThemeWrapper.getToolbarPrimaryTextAndIconColor(), android.graphics.PorterDuff.Mode.SRC_IN); int colorAccent = mCustomThemeWrapper.getColorAccent(); binding.searchInTextViewSearchActivity.setTextColor(colorAccent); - binding.deleteAllRecentSearchesButtonSearchActivity.setIconTint(ColorStateList.valueOf(mCustomThemeWrapper.getPrimaryIconColor())); binding.subredditNameTextViewSearchActivity.setTextColor(mCustomThemeWrapper.getPrimaryTextColor()); + binding.deleteAllRecentSearchesButtonSearchActivity.setIconTint(ColorStateList.valueOf(mCustomThemeWrapper.getPrimaryIconColor())); + binding.dividerSearchActivity.setBackgroundColor(mCustomThemeWrapper.getDividerColor()); if (typeface != null) { Utils.setFontToAllTextViews(binding.getRoot(), typeface); } |