Added compose / manage local contacts

pull/194/merge
M66B 3 years ago
parent bb4d409044
commit 5a2cd8e608

@ -1600,6 +1600,7 @@ public class FragmentCompose extends FragmentBase {
menu.findItem(R.id.menu_compact).setEnabled(state == State.LOADED); menu.findItem(R.id.menu_compact).setEnabled(state == State.LOADED);
menu.findItem(R.id.menu_contact_group).setEnabled( menu.findItem(R.id.menu_contact_group).setEnabled(
state == State.LOADED && hasPermission(Manifest.permission.READ_CONTACTS)); state == State.LOADED && hasPermission(Manifest.permission.READ_CONTACTS));
menu.findItem(R.id.menu_manage_local_contacts).setEnabled(state == State.LOADED);
menu.findItem(R.id.menu_answer_insert).setEnabled(state == State.LOADED); menu.findItem(R.id.menu_answer_insert).setEnabled(state == State.LOADED);
menu.findItem(R.id.menu_answer_create).setEnabled(state == State.LOADED); menu.findItem(R.id.menu_answer_create).setEnabled(state == State.LOADED);
menu.findItem(R.id.menu_clear).setEnabled(state == State.LOADED); menu.findItem(R.id.menu_clear).setEnabled(state == State.LOADED);
@ -1697,6 +1698,9 @@ public class FragmentCompose extends FragmentBase {
} else if (itemId == R.id.menu_contact_group) { } else if (itemId == R.id.menu_contact_group) {
onMenuContactGroup(); onMenuContactGroup();
return true; return true;
} else if (itemId == R.id.menu_manage_local_contacts) {
onMenuManageLocalContacts();
return true;
} else if (itemId == R.id.menu_answer_insert) { } else if (itemId == R.id.menu_answer_insert) {
onMenuAnswerInsert(); onMenuAnswerInsert();
return true; return true;
@ -1868,6 +1872,12 @@ public class FragmentCompose extends FragmentBase {
onMenuContactGroup(view.findFocus()); onMenuContactGroup(view.findFocus());
} }
private void onMenuManageLocalContacts() {
FragmentTransaction fragmentTransaction = getParentFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentContacts()).addToBackStack("contacts");
fragmentTransaction.commit();
}
private void onMenuContactGroup(View v) { private void onMenuContactGroup(View v) {
int focussed = 0; int focussed = 0;
if (v != null) { if (v != null) {

@ -69,6 +69,12 @@
<menu /> <menu />
</item> </item>
<item
android:id="@+id/menu_manage_local_contacts"
android:icon="@drawable/twotone_import_contacts_24"
android:title="@string/title_manage_local_contacts"
app:showAsAction="never" />
<item <item
android:id="@+id/menu_answer_insert" android:id="@+id/menu_answer_insert"
android:icon="@drawable/twotone_text_snippet_24" android:icon="@drawable/twotone_text_snippet_24"

@ -1248,6 +1248,7 @@
<string name="title_send_dialog">Show send options</string> <string name="title_send_dialog">Show send options</string>
<string name="title_image_dialog">Show image options</string> <string name="title_image_dialog">Show image options</string>
<string name="title_media_toolbar">Media toolbar</string> <string name="title_media_toolbar">Media toolbar</string>
<string name="title_manage_local_contacts">Manage local contacts</string>
<string name="title_insert_contact_group">Insert contact group</string> <string name="title_insert_contact_group">Insert contact group</string>
<string name="title_insert_template">Insert template</string> <string name="title_insert_template">Insert template</string>
<string name="title_create_template">Create template</string> <string name="title_create_template">Create template</string>

Loading…
Cancel
Save