From 49d0558da150b53025e9004e6f22048c212c889d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 19 Jan 2021 12:58:05 +0100 Subject: [PATCH] fix tab height in StartConversation screen --- .../ui/StartConversationActivity.java | 20 +++++------ .../layout/activity_start_conversation.xml | 33 ++++++++++--------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index ac86aedef..b2d33a7d1 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -93,17 +93,17 @@ public class StartConversationActivity extends XmppActivity implements XmppConne public int conference_context_id; public int contact_context_id; private ListPagerAdapter mListPagerAdapter; - private List contacts = new ArrayList<>(); + private final List contacts = new ArrayList<>(); private ListItemAdapter mContactsAdapter; - private List conferences = new ArrayList<>(); + private final List conferences = new ArrayList<>(); private ListItemAdapter mConferenceAdapter; - private List mActivatedAccounts = new ArrayList<>(); + private final List mActivatedAccounts = new ArrayList<>(); private EditText mSearchEditText; - private AtomicBoolean mRequestedContactsPermission = new AtomicBoolean(false); - private AtomicBoolean mOpenedFab = new AtomicBoolean(false); + private final AtomicBoolean mRequestedContactsPermission = new AtomicBoolean(false); + private final AtomicBoolean mOpenedFab = new AtomicBoolean(false); private boolean mHideOfflineContacts = false; private boolean createdByViewIntent = false; - private MenuItem.OnActionExpandListener mOnActionExpandListener = new MenuItem.OnActionExpandListener() { + private final MenuItem.OnActionExpandListener mOnActionExpandListener = new MenuItem.OnActionExpandListener() { @Override public boolean onMenuItemActionExpand(MenuItem item) { @@ -132,7 +132,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne return true; } }; - private TextWatcher mSearchTextWatcher = new TextWatcher() { + private final TextWatcher mSearchTextWatcher = new TextWatcher() { @Override public void afterTextChanged(Editable editable) { @@ -148,7 +148,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne } }; private MenuItem mMenuSearchView; - private ListItemAdapter.OnTagClickedListener mOnTagClickedListener = new ListItemAdapter.OnTagClickedListener() { + private final ListItemAdapter.OnTagClickedListener mOnTagClickedListener = new ListItemAdapter.OnTagClickedListener() { @Override public void onTagClicked(String tag) { if (mMenuSearchView != null) { @@ -161,7 +161,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne }; private Pair mPostponedActivityResult; private Toast mToast; - private UiCallback mAdhocConferenceCallback = new UiCallback() { + private final UiCallback mAdhocConferenceCallback = new UiCallback() { @Override public void success(final Conversation conversation) { runOnUiThread(() -> { @@ -181,7 +181,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne } }; private ActivityStartConversationBinding binding; - private TextView.OnEditorActionListener mSearchDone = new TextView.OnEditorActionListener() { + private final TextView.OnEditorActionListener mSearchDone = new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { int pos = binding.startConversationViewPager.getCurrentItem(); diff --git a/src/main/res/layout/activity_start_conversation.xml b/src/main/res/layout/activity_start_conversation.xml index 6709b3b2a..d4c2f5b57 100644 --- a/src/main/res/layout/activity_start_conversation.xml +++ b/src/main/res/layout/activity_start_conversation.xml @@ -1,25 +1,29 @@ + - + + app:tabMode="fixed" + app:tabSelectedTextColor="@color/white" + app:tabTextColor="@color/white70" /> + + android:background="?color_background_overlay" /> + app:backgroundTint="?colorPrimary" + app:sdMainFabClosedBackgroundColor="?colorPrimary" + app:sdMainFabClosedSrc="@drawable/ic_add_white_24dp" + app:sdMainFabOpenedBackgroundColor="?colorPrimaryDark" + app:sdOverlayLayout="@id/overlay" + app:sdUseReverseAnimationOnClose="true" />