diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/SearchActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/SearchActivity.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SearchActivity.java b/src/main/java/de/pixart/messenger/ui/SearchActivity.java index 152544c7e..e65b2dd6c 100644 --- a/src/main/java/de/pixart/messenger/ui/SearchActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SearchActivity.java @@ -47,6 +47,8 @@ import de.pixart.messenger.R; import de.pixart.messenger.databinding.ActivitySearchBinding; import de.pixart.messenger.entities.Message; import de.pixart.messenger.ui.adapter.MessageAdapter; +import de.pixart.messenger.ui.util.Color; +import de.pixart.messenger.ui.util.Drawable; import static de.pixart.messenger.ui.util.SoftKeyboardUtils.hideSoftKeyboard; import static de.pixart.messenger.ui.util.SoftKeyboardUtils.showKeyboard; @@ -96,6 +98,18 @@ public class SearchActivity extends XmppActivity implements TextWatcher { } + private void changeBackground(boolean hasSearch, boolean hasResults) { + if (hasSearch) { + if (hasResults) { + binding.searchResults.setBackgroundColor(Color.get(this, R.attr.color_background_secondary)); + } else { + binding.searchResults.setBackground(Drawable.get(this, R.attr.activity_background_no_results)); + } + } else { + binding.searchResults.setBackground(Drawable.get(this, R.attr.activity_background_search)); + } + } + @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { |