From 4f1e71e3c4ba1dc7e2804794e64afd421921ec99 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 23 Jun 2018 21:35:37 +0200 Subject: [PATCH] choose contact activity: start action mode on short press --- .../ui/ChooseContactActivity.java | 555 +++++++++--------- .../drawable-hdpi/ic_forward_white_24dp.png | Bin 0 -> 139 bytes .../drawable-mdpi/ic_forward_white_24dp.png | Bin 0 -> 117 bytes .../drawable-xhdpi/ic_forward_white_24dp.png | Bin 0 -> 159 bytes .../drawable-xxhdpi/ic_forward_white_24dp.png | Bin 0 -> 204 bytes .../ic_forward_white_24dp.png | Bin 0 -> 236 bytes .../drawable/list_item_background_dark.xml | 34 ++ .../drawable/list_item_background_light.xml | 34 ++ src/main/res/layout/contact.xml | 2 +- src/main/res/menu/select_multiple.xml | 10 - src/main/res/values/attrs.xml | 2 + src/main/res/values/colors.xml | 1 + src/main/res/values/strings.xml | 5 +- src/main/res/values/themes.xml | 6 +- 14 files changed, 363 insertions(+), 286 deletions(-) create mode 100644 src/main/res/drawable-hdpi/ic_forward_white_24dp.png create mode 100644 src/main/res/drawable-mdpi/ic_forward_white_24dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_forward_white_24dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_forward_white_24dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_forward_white_24dp.png create mode 100644 src/main/res/drawable/list_item_background_dark.xml create mode 100644 src/main/res/drawable/list_item_background_light.xml delete mode 100644 src/main/res/menu/select_multiple.xml diff --git a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java index 72197b525..fc087a38d 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java @@ -11,7 +11,6 @@ import android.support.v4.app.FragmentTransaction; import android.support.v7.app.ActionBar; import android.view.ActionMode; import android.view.Menu; -import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.inputmethod.InputMethodManager; @@ -38,298 +37,316 @@ import eu.siacs.conversations.ui.util.PendingItem; import eu.siacs.conversations.utils.XmppUri; import rocks.xmpp.addr.Jid; -public class ChooseContactActivity extends AbstractSearchableListItemActivity { - public static final String EXTRA_TITLE_RES_ID = "extra_title_res_id"; - private List mActivatedAccounts = new ArrayList<>(); - private Set selected = new HashSet<>(); - private Set filterContacts; +public class ChooseContactActivity extends AbstractSearchableListItemActivity implements MultiChoiceModeListener { + public static final String EXTRA_TITLE_RES_ID = "extra_title_res_id"; + private List mActivatedAccounts = new ArrayList<>(); + private Set selected = new HashSet<>(); + private Set filterContacts; - private PendingItem postponedActivityResult = new PendingItem<>(); + private boolean showEnterJid = false; - public static Intent create(Activity activity, Conversation conversation) { - final Intent intent = new Intent(activity, ChooseContactActivity.class); - List contacts = new ArrayList<>(); - if (conversation.getMode() == Conversation.MODE_MULTI) { - for (MucOptions.User user : conversation.getMucOptions().getUsers(false)) { - Jid jid = user.getRealJid(); - if (jid != null) { - contacts.add(jid.asBareJid().toString()); - } - } - } else { - contacts.add(conversation.getJid().asBareJid().toString()); - } - intent.putExtra("filter_contacts", contacts.toArray(new String[contacts.size()])); - intent.putExtra("conversation", conversation.getUuid()); - intent.putExtra("multiple", true); - intent.putExtra("show_enter_jid", true); - intent.putExtra(EXTRA_ACCOUNT, conversation.getAccount().getJid().asBareJid().toString()); - return intent; - } + private PendingItem postponedActivityResult = new PendingItem<>(); - @Override - public void onCreate(final Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - filterContacts = new HashSet<>(); - if (savedInstanceState != null) { - String[] selectedContacts = savedInstanceState.getStringArray("selected_contacts"); - if (selectedContacts != null) { - selected.clear(); - selected.addAll(Arrays.asList(selectedContacts)); - } - } + public static Intent create(Activity activity, Conversation conversation) { + final Intent intent = new Intent(activity, ChooseContactActivity.class); + List contacts = new ArrayList<>(); + if (conversation.getMode() == Conversation.MODE_MULTI) { + for (MucOptions.User user : conversation.getMucOptions().getUsers(false)) { + Jid jid = user.getRealJid(); + if (jid != null) { + contacts.add(jid.asBareJid().toString()); + } + } + } else { + contacts.add(conversation.getJid().asBareJid().toString()); + } + intent.putExtra("filter_contacts", contacts.toArray(new String[contacts.size()])); + intent.putExtra("conversation", conversation.getUuid()); + intent.putExtra("multiple", true); + intent.putExtra("show_enter_jid", true); + intent.putExtra(EXTRA_ACCOUNT, conversation.getAccount().getJid().asBareJid().toString()); + return intent; + } - String[] contacts = getIntent().getStringArrayExtra("filter_contacts"); - if (contacts != null) { - Collections.addAll(filterContacts, contacts); - } + @Override + public void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + filterContacts = new HashSet<>(); + if (savedInstanceState != null) { + String[] selectedContacts = savedInstanceState.getStringArray("selected_contacts"); + if (selectedContacts != null) { + selected.clear(); + selected.addAll(Arrays.asList(selectedContacts)); + } + } - if (getIntent().getBooleanExtra("multiple", false)) { - getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL); - getListView().setMultiChoiceModeListener(new MultiChoiceModeListener() { + String[] contacts = getIntent().getStringArrayExtra("filter_contacts"); + if (contacts != null) { + Collections.addAll(filterContacts, contacts); + } - @Override - public boolean onPrepareActionMode(ActionMode mode, Menu menu) { - return false; - } + Intent intent = getIntent(); - @Override - public boolean onCreateActionMode(ActionMode mode, Menu menu) { - binding.fab.setVisibility(View.GONE); - final View view = getSearchEditText(); - final InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); - if (view != null && imm != null) { - imm.hideSoftInputFromWindow(getSearchEditText().getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); - } - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.select_multiple, menu); - MenuItem selectButton = menu.findItem(R.id.selection_submit); - String buttonText = getResources().getQuantityString(R.plurals.select_contact, selected.size(), selected.size()); - selectButton.setTitle(buttonText); - return true; - } + final boolean multiple = intent.getBooleanExtra("multiple", false); + if (multiple) { + getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL); + getListView().setMultiChoiceModeListener(this); + } - @Override - public void onDestroyActionMode(ActionMode mode) { - binding.fab.setVisibility(View.VISIBLE); - selected.clear(); - } + getListView().setOnItemClickListener((parent, view, position, id) -> { + if (multiple) { + startActionMode(this); + getListView().setItemChecked(position, true); + return; + } + final InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(getSearchEditText().getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); + final Intent request = getIntent(); + final Intent data = new Intent(); + final ListItem mListItem = getListItems().get(position); + data.putExtra("contact", mListItem.getJid().toString()); + String account = request.getStringExtra(EXTRA_ACCOUNT); + if (account == null && mListItem instanceof Contact) { + account = ((Contact) mListItem).getAccount().getJid().asBareJid().toString(); + } + data.putExtra(EXTRA_ACCOUNT, account); + data.putExtra("conversation", request.getStringExtra("conversation")); + data.putExtra("multiple", false); + data.putExtra("subject", request.getStringExtra("subject")); + setResult(RESULT_OK, data); + finish(); + }); + final Intent i = getIntent(); + this.showEnterJid = i != null && i.getBooleanExtra("show_enter_jid", false); + this.binding.fab.setOnClickListener(this::onFabClicked); + if (this.showEnterJid) { + this.binding.fab.setVisibility(View.VISIBLE); + } else { + this.binding.fab.setVisibility(View.GONE); + } + } - @Override - public boolean onActionItemClicked(ActionMode mode, MenuItem item) { - switch (item.getItemId()) { - case R.id.selection_submit: - final Intent request = getIntent(); - final Intent data = new Intent(); - data.putExtra("conversation", - request.getStringExtra("conversation")); - String[] selection = getSelectedContactJids(); - data.putExtra("contacts", selection); - data.putExtra("multiple", true); - data.putExtra(EXTRA_ACCOUNT, request.getStringExtra(EXTRA_ACCOUNT)); - data.putExtra("subject", request.getStringExtra("subject")); - setResult(RESULT_OK, data); - finish(); - return true; - } - return false; - } + private void onFabClicked(View v) { + if (selected.size() == 0) { + showEnterJidDialog(null); + } else { + submitSelection(); + } + } - @Override - public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) { - Contact item = (Contact) getListItems().get(position); - if (checked) { - selected.add(item.getJid().toString()); - } else { - selected.remove(item.getJid().toString()); - } - int numSelected = selected.size(); - MenuItem selectButton = mode.getMenu().findItem(R.id.selection_submit); - String buttonText = getResources().getQuantityString(R.plurals.select_contact, - numSelected, numSelected); - selectButton.setTitle(buttonText); - } - }); - } + @Override + public boolean onPrepareActionMode(ActionMode mode, Menu menu) { + return false; + } - getListView().setOnItemClickListener((parent, view, position, id) -> { - final InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); - imm.hideSoftInputFromWindow(getSearchEditText().getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); - final Intent request = getIntent(); - final Intent data = new Intent(); - final ListItem mListItem = getListItems().get(position); - data.putExtra("contact", mListItem.getJid().toString()); - String account = request.getStringExtra(EXTRA_ACCOUNT); - if (account == null && mListItem instanceof Contact) { - account = ((Contact) mListItem).getAccount().getJid().asBareJid().toString(); - } - data.putExtra(EXTRA_ACCOUNT, account); - data.putExtra("conversation", request.getStringExtra("conversation")); - data.putExtra("multiple", false); - data.putExtra("subject", request.getStringExtra("subject")); - setResult(RESULT_OK, data); - finish(); - }); - final Intent i = getIntent(); - boolean showEnterJid = i != null && i.getBooleanExtra("show_enter_jid", false); - if (showEnterJid) { - this.binding.fab.setOnClickListener((v) -> showEnterJidDialog(null)); - } else { - this.binding.fab.setVisibility(View.GONE); - } - } + @Override + public boolean onCreateActionMode(ActionMode mode, Menu menu) { + mode.setTitle(getTitleFromIntent()); + binding.fab.setImageResource(R.drawable.ic_forward_white_24dp); + binding.fab.setVisibility(View.VISIBLE); + final View view = getSearchEditText(); + final InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); + if (view != null && imm != null) { + imm.hideSoftInputFromWindow(getSearchEditText().getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); + } + return true; + } - @Override - public void onStart() { - super.onStart(); - Intent intent = getIntent(); - @StringRes - int res = intent != null ? intent.getIntExtra(EXTRA_TITLE_RES_ID, R.string.title_activity_choose_contact) : R.string.title_activity_choose_contact; - ActionBar bar = getSupportActionBar(); - if (bar != null) { - try { - bar.setTitle(res); - } catch (Exception e) { - bar.setTitle(R.string.title_activity_choose_contact); - } - } - } + @Override + public void onDestroyActionMode(ActionMode mode) { + this.binding.fab.setImageResource(R.drawable.ic_person_add_white_24dp); + if (this.showEnterJid) { + this.binding.fab.setVisibility(View.VISIBLE); + } else { + this.binding.fab.setVisibility(View.GONE); + } + selected.clear(); + } - @Override - public boolean onCreateOptionsMenu(final Menu menu) { - super.onCreateOptionsMenu(menu); - final Intent i = getIntent(); - boolean showEnterJid = i != null && i.getBooleanExtra("show_enter_jid", false); - menu.findItem(R.id.action_scan_qr_code).setVisible(isCameraFeatureAvailable() && showEnterJid); - return true; - } + @Override + public boolean onActionItemClicked(ActionMode mode, MenuItem item) { + return false; + } - @Override - public void onSaveInstanceState(Bundle savedInstanceState) { - savedInstanceState.putStringArray("selected_contacts",getSelectedContactJids()); - super.onSaveInstanceState(savedInstanceState); - } + private void submitSelection() { + final Intent request = getIntent(); + final Intent data = new Intent(); + data.putExtra("conversation", request.getStringExtra("conversation")); + String[] selection = getSelectedContactJids(); + data.putExtra("contacts", selection); + data.putExtra("multiple", true); + data.putExtra(EXTRA_ACCOUNT, request.getStringExtra(EXTRA_ACCOUNT)); + data.putExtra("subject", request.getStringExtra("subject")); + setResult(RESULT_OK, data); + finish(); + } - protected void filterContacts(final String needle) { - getListItems().clear(); - if (xmppConnectionService == null) { - getListItemAdapter().notifyDataSetChanged(); - return; - } - for (final Account account : xmppConnectionService.getAccounts()) { - if (account.getStatus() != Account.State.DISABLED) { - for (final Contact contact : account.getRoster().getContacts()) { - if (contact.showInRoster() && - !filterContacts.contains(contact.getJid().asBareJid().toString()) - && contact.match(this, needle)) { - getListItems().add(contact); - } - } - } - } - Collections.sort(getListItems()); - getListItemAdapter().notifyDataSetChanged(); - } + @Override + public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) { + Contact item = (Contact) getListItems().get(position); + if (checked) { + selected.add(item.getJid().toString()); + } else { + selected.remove(item.getJid().toString()); + } + } - private String[] getSelectedContactJids() { - return selected.toArray(new String[selected.size()]); - } + @Override + public void onStart() { + super.onStart(); + ActionBar bar = getSupportActionBar(); + if (bar != null) { + try { + bar.setTitle(getTitleFromIntent()); + } catch (Exception e) { + bar.setTitle(R.string.title_activity_choose_contact); + } + } + } - public void refreshUiReal() { - //nothing to do. This Activity doesn't implement any listeners - } + public @StringRes + int getTitleFromIntent() { + final Intent intent = getIntent(); + boolean multiple = intent != null && intent.getBooleanExtra("multiple", false); + @StringRes int fallback = multiple ? R.string.title_activity_choose_contacts : R.string.title_activity_choose_contact; + return intent != null ? intent.getIntExtra(EXTRA_TITLE_RES_ID, fallback) : fallback; + } - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.action_scan_qr_code: - ScanActivity.scan(this); - return true; - } - return super.onOptionsItemSelected(item); - } + @Override + public boolean onCreateOptionsMenu(final Menu menu) { + super.onCreateOptionsMenu(menu); + final Intent i = getIntent(); + boolean showEnterJid = i != null && i.getBooleanExtra("show_enter_jid", false); + menu.findItem(R.id.action_scan_qr_code).setVisible(isCameraFeatureAvailable() && showEnterJid); + return true; + } - protected void showEnterJidDialog(XmppUri uri) { - FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); - Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog"); - if (prev != null) { - ft.remove(prev); - } - ft.addToBackStack(null); - Jid jid = uri == null ? null : uri.getJid(); - EnterJidDialog dialog = EnterJidDialog.newInstance( - mActivatedAccounts, - getString(R.string.enter_contact), - getString(R.string.select), - jid == null ? null : jid.asBareJid().toString(), - getIntent().getStringExtra(EXTRA_ACCOUNT), - true - ); + @Override + public void onSaveInstanceState(Bundle savedInstanceState) { + savedInstanceState.putStringArray("selected_contacts", getSelectedContactJids()); + super.onSaveInstanceState(savedInstanceState); + } - dialog.setOnEnterJidDialogPositiveListener((accountJid, contactJid) -> { - final Intent request = getIntent(); - final Intent data = new Intent(); - data.putExtra("contact", contactJid.toString()); - data.putExtra(EXTRA_ACCOUNT, accountJid.toString()); - data.putExtra("conversation", - request.getStringExtra("conversation")); - data.putExtra("multiple", false); - data.putExtra("subject", request.getStringExtra("subject")); - setResult(RESULT_OK, data); - finish(); + protected void filterContacts(final String needle) { + getListItems().clear(); + if (xmppConnectionService == null) { + getListItemAdapter().notifyDataSetChanged(); + return; + } + for (final Account account : xmppConnectionService.getAccounts()) { + if (account.getStatus() != Account.State.DISABLED) { + for (final Contact contact : account.getRoster().getContacts()) { + if (contact.showInRoster() && + !filterContacts.contains(contact.getJid().asBareJid().toString()) + && contact.match(this, needle)) { + getListItems().add(contact); + } + } + } + } + Collections.sort(getListItems()); + getListItemAdapter().notifyDataSetChanged(); + } - return true; - }); + private String[] getSelectedContactJids() { + return selected.toArray(new String[selected.size()]); + } - dialog.show(ft, "dialog"); - } + public void refreshUiReal() { + //nothing to do. This Activity doesn't implement any listeners + } - @Override - public void onActivityResult(int requestCode, int resultCode, Intent intent) { - super.onActivityResult(requestCode, requestCode, intent); - ActivityResult activityResult = ActivityResult.of(requestCode, resultCode, intent); - if (xmppConnectionService != null) { - handleActivityResult(activityResult); - } else { - this.postponedActivityResult.push(activityResult); - } - } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case R.id.action_scan_qr_code: + ScanActivity.scan(this); + return true; + } + return super.onOptionsItemSelected(item); + } - private void handleActivityResult(ActivityResult activityResult) { - if (activityResult.resultCode == RESULT_OK && activityResult.requestCode == ScanActivity.REQUEST_SCAN_QR_CODE) { - String result = activityResult.data.getStringExtra(ScanActivity.INTENT_EXTRA_RESULT); - XmppUri uri = new XmppUri(result == null ? "" : result); - if (uri.isJidValid()) { - showEnterJidDialog(uri); - } - } - } + protected void showEnterJidDialog(XmppUri uri) { + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); + Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog"); + if (prev != null) { + ft.remove(prev); + } + ft.addToBackStack(null); + Jid jid = uri == null ? null : uri.getJid(); + EnterJidDialog dialog = EnterJidDialog.newInstance( + mActivatedAccounts, + getString(R.string.enter_contact), + getString(R.string.select), + jid == null ? null : jid.asBareJid().toString(), + getIntent().getStringExtra(EXTRA_ACCOUNT), + true + ); - @Override - void onBackendConnected() { - filterContacts(); - this.mActivatedAccounts.clear(); - for (Account account : xmppConnectionService.getAccounts()) { - if (account.getStatus() != Account.State.DISABLED) { - if (Config.DOMAIN_LOCK != null) { - this.mActivatedAccounts.add(account.getJid().getLocal()); - } else { - this.mActivatedAccounts.add(account.getJid().asBareJid().toString()); - } - } - } - ActivityResult activityResult = this.postponedActivityResult.pop(); - if (activityResult != null) { - handleActivityResult(activityResult); - } - Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG); - if (fragment != null && fragment instanceof OnBackendConnected) { - ((OnBackendConnected) fragment).onBackendConnected(); - } - } + dialog.setOnEnterJidDialogPositiveListener((accountJid, contactJid) -> { + final Intent request = getIntent(); + final Intent data = new Intent(); + data.putExtra("contact", contactJid.toString()); + data.putExtra(EXTRA_ACCOUNT, accountJid.toString()); + data.putExtra("conversation", + request.getStringExtra("conversation")); + data.putExtra("multiple", false); + data.putExtra("subject", request.getStringExtra("subject")); + setResult(RESULT_OK, data); + finish(); - @Override - public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { - ScanActivity.onRequestPermissionResult(this, requestCode, grantResults); - } + return true; + }); + + dialog.show(ft, "dialog"); + } + + @Override + public void onActivityResult(int requestCode, int resultCode, Intent intent) { + super.onActivityResult(requestCode, requestCode, intent); + ActivityResult activityResult = ActivityResult.of(requestCode, resultCode, intent); + if (xmppConnectionService != null) { + handleActivityResult(activityResult); + } else { + this.postponedActivityResult.push(activityResult); + } + } + + private void handleActivityResult(ActivityResult activityResult) { + if (activityResult.resultCode == RESULT_OK && activityResult.requestCode == ScanActivity.REQUEST_SCAN_QR_CODE) { + String result = activityResult.data.getStringExtra(ScanActivity.INTENT_EXTRA_RESULT); + XmppUri uri = new XmppUri(result == null ? "" : result); + if (uri.isJidValid()) { + showEnterJidDialog(uri); + } + } + } + + @Override + void onBackendConnected() { + filterContacts(); + this.mActivatedAccounts.clear(); + for (Account account : xmppConnectionService.getAccounts()) { + if (account.getStatus() != Account.State.DISABLED) { + if (Config.DOMAIN_LOCK != null) { + this.mActivatedAccounts.add(account.getJid().getLocal()); + } else { + this.mActivatedAccounts.add(account.getJid().asBareJid().toString()); + } + } + } + ActivityResult activityResult = this.postponedActivityResult.pop(); + if (activityResult != null) { + handleActivityResult(activityResult); + } + Fragment fragment = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG); + if (fragment != null && fragment instanceof OnBackendConnected) { + ((OnBackendConnected) fragment).onBackendConnected(); + } + } + + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { + ScanActivity.onRequestPermissionResult(this, requestCode, grantResults); + } } diff --git a/src/main/res/drawable-hdpi/ic_forward_white_24dp.png b/src/main/res/drawable-hdpi/ic_forward_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..a0711d377e2c459e5ab603ebe1b57ab2e0385858 GIT binary patch literal 139 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K8kf)1dh{y4_S1)ohDDWJ)&{sG6 zxTr{zSSDMA{G#-$Uoww0P0)ZqizPQS#kM#%xb%7 literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-xhdpi/ic_forward_white_24dp.png b/src/main/res/drawable-xhdpi/ic_forward_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..7a5df52bf06badc246f1c775a25735faa2da0142 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DG*1`Dkch)?uU+J9Fc4sM^xl8& zxKxvl%B0)`JC%FY^KQT0HfJTHp`(w0@DUau^1+?Tk$wCz`uz9XZ`=3&(BQG1zl7}p&_)JNS3j3^P6IM{I`Q17{UO^%HeUaAwddnQ|Gs;9 z+hbywm1?g@=F;Fx9uvPgKMw;^$RgTZCP9w31C~tWy49xC8?r7}m=mwBzO+t7RB74v#A9lb33L~Or>mdKI;Vst0B;vpKL7v# literal 0 HcmV?d00001 diff --git a/src/main/res/drawable/list_item_background_dark.xml b/src/main/res/drawable/list_item_background_dark.xml new file mode 100644 index 000000000..ea08ab05e --- /dev/null +++ b/src/main/res/drawable/list_item_background_dark.xml @@ -0,0 +1,34 @@ + + + + + + \ No newline at end of file diff --git a/src/main/res/drawable/list_item_background_light.xml b/src/main/res/drawable/list_item_background_light.xml new file mode 100644 index 000000000..721ee664d --- /dev/null +++ b/src/main/res/drawable/list_item_background_light.xml @@ -0,0 +1,34 @@ + + + + + + \ No newline at end of file diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml index 0cda2001b..76887d300 100644 --- a/src/main/res/layout/contact.xml +++ b/src/main/res/layout/contact.xml @@ -5,7 +5,7 @@ - - - - - diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index df4116213..0f89bc8df 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -20,6 +20,8 @@ + + diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml index ebb8b824c..69474a4b4 100644 --- a/src/main/res/values/colors.xml +++ b/src/main/res/values/colors.xml @@ -13,6 +13,7 @@ #ffeeeeee #ffe0e0e0 #ff9e9e9e + #ff616161 #ff424242 #ff282828 #fff44336 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 4d1a29bc5..f9bbc9994 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -20,6 +20,7 @@ Share with Conversation Start Conversation Choose Contact + Choose Contacts Share via account Block list just now @@ -419,10 +420,6 @@ %d certificate deleted %d certificates deleted - - Select %d contact - Select %d contacts - Replace send button with quick action Quick Action None diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index 477ee2330..13f846b23 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -15,11 +15,12 @@ @drawable/search_background_light @drawable/no_results_background_light + @drawable/list_item_background_light @color/black true - @color/blue_a200 + ?colorPrimary 12sp 14sp @@ -107,6 +108,7 @@ @color/grey900 @drawable/search_background_dark @drawable/no_results_background_dark + @drawable/list_item_background_dark @color/red_a100 @color/green500 @@ -115,7 +117,7 @@ @color/white true - @color/blue_a100 + ?colorPrimary 12sp 14sp