mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
Search view style cleanup.
This commit is contained in:
parent
3deb9602d1
commit
5147bdfbcb
@ -18,8 +18,8 @@
|
|||||||
<item name="android:textSize">@dimen/very_large_font_size</item>
|
<item name="android:textSize">@dimen/very_large_font_size</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TextSecure.BaseDarkTheme.SearchView" parent="@style/Widget.AppCompat.SearchView">
|
<style name="Widget.Session.SearchView" parent="@style/Widget.AppCompat.SearchView">
|
||||||
<item name="closeIcon">@drawable/ic_baseline_clear_24</item>
|
<item name="closeIcon">@drawable/ic_clear</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ThemeOverlay.Session.AlertDialog" parent="ThemeOverlay.AppCompat.Dialog.Alert">
|
<style name="ThemeOverlay.Session.AlertDialog" parent="ThemeOverlay.AppCompat.Dialog.Alert">
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
<item name="dividerVertical">@color/separator</item>
|
<item name="dividerVertical">@color/separator</item>
|
||||||
<item name="dividerHorizontal">?dividerVertical</item>
|
<item name="dividerHorizontal">?dividerVertical</item>
|
||||||
|
|
||||||
|
<item name="searchViewStyle">@style/Widget.Session.SearchView</item>
|
||||||
|
|
||||||
<!-- App specific attributes -->
|
<!-- App specific attributes -->
|
||||||
<item name="ic_visibility_on">@drawable/ic_baseline_visibility_24</item>
|
<item name="ic_visibility_on">@drawable/ic_baseline_visibility_24</item>
|
||||||
<item name="ic_visibility_off">@drawable/ic_baseline_visibility_off_24</item>
|
<item name="ic_visibility_off">@drawable/ic_baseline_visibility_off_24</item>
|
||||||
@ -50,8 +52,7 @@
|
|||||||
|
|
||||||
<item name="media_overview_toolbar_background">@color/transparent</item>
|
<item name="media_overview_toolbar_background">@color/transparent</item>
|
||||||
<item name="media_overview_header_foreground">@color/text</item>
|
<item name="media_overview_header_foreground">@color/text</item>
|
||||||
<item name="media_keyboard_button_color">@color/core_grey_25</item>
|
<item name="media_keyboard_button_color">@color/core_grey_25</item>\
|
||||||
<item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item>
|
|
||||||
|
|
||||||
<item name="attachment_type_selector_background">?android:windowBackground</item>
|
<item name="attachment_type_selector_background">?android:windowBackground</item>
|
||||||
<item name="attachment_type_selector_hide_button_background">@color/gray50</item>
|
<item name="attachment_type_selector_hide_button_background">@color/gray50</item>
|
||||||
@ -161,7 +162,6 @@
|
|||||||
<item name="media_overview_header_foreground">@color/text</item>
|
<item name="media_overview_header_foreground">@color/text</item>
|
||||||
|
|
||||||
<item name="theme_type">dark</item>
|
<item name="theme_type">dark</item>
|
||||||
<item name="searchViewStyle">@style/TextSecure.BaseDarkTheme.SearchView</item>
|
|
||||||
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
<item name="android:navigationBarColor">@color/compose_view_background</item>
|
||||||
|
|
||||||
<item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item>
|
<item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item>
|
||||||
|
@ -3,8 +3,6 @@ package org.thoughtcrime.securesms.components;
|
|||||||
|
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.PorterDuff;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
@ -49,11 +47,8 @@ public class SearchToolbar extends LinearLayout {
|
|||||||
|
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
|
|
||||||
Drawable drawable = getContext().getResources().getDrawable(R.drawable.ic_arrow_back_white_24dp);
|
toolbar.setNavigationIcon(
|
||||||
drawable.mutate();
|
getContext().getResources().getDrawable(R.drawable.ic_baseline_clear_24));
|
||||||
drawable.setColorFilter(getContext().getResources().getColor(R.color.grey_700), PorterDuff.Mode.SRC_IN);
|
|
||||||
|
|
||||||
toolbar.setNavigationIcon(drawable);
|
|
||||||
toolbar.inflateMenu(R.menu.conversation_list_search);
|
toolbar.inflateMenu(R.menu.conversation_list_search);
|
||||||
|
|
||||||
this.searchItem = toolbar.getMenu().findItem(R.id.action_filter_search);
|
this.searchItem = toolbar.getMenu().findItem(R.id.action_filter_search);
|
||||||
@ -122,7 +117,6 @@ public class SearchToolbar extends LinearLayout {
|
|||||||
private void hide() {
|
private void hide() {
|
||||||
if (getVisibility() == View.VISIBLE) {
|
if (getVisibility() == View.VISIBLE) {
|
||||||
|
|
||||||
|
|
||||||
if (listener != null) listener.onSearchClosed();
|
if (listener != null) listener.onSearchClosed();
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user