1
0
Fork 1

Show drawer with hamburger button or title tap

(cherry picked from commit 793f79f31b0373733f724291263f12e27c0e42f3)
This commit is contained in:
Stephen Paul Weber 2024-09-18 21:38:07 +02:00 committed by Arne
parent fd4025091d
commit 125fccd2a8
2 changed files with 20 additions and 2 deletions

View file

@ -1123,8 +1123,10 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
Log.w(Config.LOGTAG, "Unable to pop back stack after pressing home button");
}
return true;
} else {
binding.drawer.getDrawerLayout().openDrawer(binding.drawer);
return true;
}
break;
case R.id.action_scan_qr_code:
UriHandlerActivity.scan(this);
return true;
@ -1247,6 +1249,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
if (actionBar == null) {
return;
}
actionBar.setHomeAsUpIndicator(0);
final FragmentManager fragmentManager = getFragmentManager();
final Fragment mainFragment = fragmentManager.findFragmentById(R.id.main_fragment);
if (mainFragment instanceof ConversationFragment conversationFragment) {
@ -1396,8 +1399,13 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
binding.toolbarTitle.setText(R.string.app_name);
}
actionBar.setTitle(null);
actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeAsUpIndicator(R.drawable.menu_24dp);
ToolbarUtils.resetActionBarOnClickListeners(binding.toolbar);
ToolbarUtils.setActionBarOnClickListener(
binding.toolbar,
(v) -> { binding.drawer.getDrawerLayout().openDrawer(binding.drawer); }
);
}
private void openConversationDetails(final Conversation conversation) {

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M120,720L120,640L840,640L840,720L120,720ZM120,520L120,440L840,440L840,520L120,520ZM120,320L120,240L840,240L840,320L120,320Z"/>
</vector>