don't go back when close search in start conversation + hide qr code when searching + on fab clicked overlay also the toolbar

This commit is contained in:
Arne 2023-11-05 10:25:08 +01:00
parent f985137d36
commit 3032bc33b4
3 changed files with 14 additions and 10 deletions

View file

@ -136,6 +136,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
mSearchEditText.post(() -> {
mQrCodeScan.setVisible(false);
updateSearchViewHint();
mSearchEditText.requestFocus();
if (oneShotKeyboardSuppress.compareAndSet(true, false)) {
@ -157,7 +158,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
SoftKeyboardUtils.hideSoftKeyboard(StartConversationActivity.this);
mSearchEditText.setText("");
filter(null);
navigateBack();
mQrCodeScan.setVisible(true);
return true;
}
};
@ -177,6 +178,8 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
}
};
private MenuItem mMenuSearchView;
private MenuItem mQrCodeScan;
private final ListItemAdapter.OnTagClickedListener mOnTagClickedListener = new ListItemAdapter.OnTagClickedListener() {
@Override
public void onTagClicked(String tag) {
@ -747,6 +750,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
}
MenuItem qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code);
qrCodeScanMenuItem.setVisible(isCameraFeatureAvailable());
mQrCodeScan = menu.findItem(R.id.action_scan_qr_code);
menuHideOffline.setVisible(true);
menuHideOffline.setChecked(this.mHideOfflineContacts);
mMenuSearchView = menu.findItem(R.id.action_search);
@ -1321,8 +1325,9 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
if (binding.speedDial.isOpen()) {
binding.speedDial.close();
return;
} else {
navigateBack();
}
navigateBack();
}
private void navigateBack() {

View file

@ -6,6 +6,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.leinardi.android.speeddial.SpeedDialOverlayLayout
android:id="@+id/overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_background_overlay" />
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
@ -32,13 +38,6 @@
android:layout_below="@id/tab_layout"
android:background="?attr/color_background_secondary" />
<com.leinardi.android.speeddial.SpeedDialOverlayLayout
android:id="@+id/overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tab_layout"
android:background="?attr/color_background_overlay" />
<com.leinardi.android.speeddial.SpeedDialView
android:id="@+id/speed_dial"
android:layout_width="wrap_content"

View file

@ -51,7 +51,7 @@
<item name="color_background_primary">@color/grey50</item>
<item name="color_background_secondary">#FFFFFF</item>
<item name="color_background_tertiary">@color/grey300</item>
<item name="color_background_overlay">@color/grey300_40</item>
<item name="color_background_overlay">@color/grey900_40</item>
<item name="color_warning">@color/red700</item>
<item name="color_warning_button_text">@color/warning_button_dark</item>
<item name="TextColorOnline">@color/green500</item>