diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 13 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 6 | ||||
-rw-r--r-- | src/main/res/menu/contact_details.xml | 6 | ||||
-rw-r--r-- | src/main/res/values/colors.xml | 1 |
4 files changed, 8 insertions, 18 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index 0cf8a2919..024e92b02 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -6,7 +6,6 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; -import android.graphics.Color; import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; @@ -338,14 +337,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp case R.id.action_share_uri: shareLink(false); break; - case R.id.action_delete_contact: - builder.setTitle(getString(R.string.action_delete_contact)) - .setMessage( - getString(R.string.remove_contact_text, - contact.getDisplayJid())) - .setPositiveButton(getString(R.string.delete), - removeFromRoster).create().show(); - break; case R.id.action_edit_contact: Uri systemAccount = contact.getSystemAccount(); if (systemAccount == null) { @@ -382,7 +373,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp MenuItem block = menu.findItem(R.id.action_block); MenuItem unblock = menu.findItem(R.id.action_unblock); MenuItem edit = menu.findItem(R.id.action_edit_contact); - MenuItem delete = menu.findItem(R.id.action_delete_contact); if (contact == null) { return true; } @@ -399,7 +389,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp } if (!contact.showInRoster()) { edit.setVisible(false); - delete.setVisible(false); } return super.onCreateOptionsMenu(menu); } @@ -445,7 +434,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp receive.setVisibility(View.VISIBLE); addContactButton.setVisibility(View.VISIBLE); addContactButton.setText(getString(R.string.action_delete_contact)); - addContactButton.getBackground().setColorFilter(Color.RED, PorterDuff.Mode.MULTIPLY); + addContactButton.getBackground().setColorFilter(getWarningButtonColor(), PorterDuff.Mode.MULTIPLY); final AlertDialog.Builder deleteFromRosterDialog = new AlertDialog.Builder(ContactDetailsActivity.this); addContactButton.setOnClickListener(new OnClickListener() { @Override diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index bdf321dc3..840e29692 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -110,6 +110,7 @@ public abstract class XmppActivity extends Activity { protected int mPrimaryBackgroundColor; protected int mSecondaryBackgroundColor; protected int mColorRed; + protected int mColorWarningButton; protected int mColorWhite; protected int mColorOrange; protected int mColorGreen; @@ -410,6 +411,7 @@ public abstract class XmppActivity extends Activity { mSecondaryTextColor = ContextCompat.getColor(this, R.color.black54); mTertiaryTextColor = ContextCompat.getColor(this, R.color.black12); mColorRed = ContextCompat.getColor(this, R.color.red800); + mColorWarningButton = ContextCompat.getColor(this, R.color.warning_button); mColorWhite = ContextCompat.getColor(this, R.color.white70); mColorOrange = ContextCompat.getColor(this, R.color.orange500); mColorGreen = ContextCompat.getColor(this, R.color.realgreen); @@ -979,6 +981,10 @@ public abstract class XmppActivity extends Activity { return this.mColorRed; } + public int getWarningButtonColor() { + return this.mColorWarningButton; + } + public int getOnlineColor() { return this.mColorGreen; } diff --git a/src/main/res/menu/contact_details.xml b/src/main/res/menu/contact_details.xml index f60416dc6..29ef166e5 100644 --- a/src/main/res/menu/contact_details.xml +++ b/src/main/res/menu/contact_details.xml @@ -28,12 +28,6 @@ </item> <item - android:id="@+id/action_delete_contact" - android:orderInCategory="10" - android:showAsAction="never" - android:title="@string/action_delete_contact" /> - - <item android:id="@+id/action_block" android:orderInCategory="72" android:showAsAction="always" diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml index 3388c19fc..0879822cf 100644 --- a/src/main/res/values/colors.xml +++ b/src/main/res/values/colors.xml @@ -24,4 +24,5 @@ <color name="online">#ff259b24</color> <color name="away">#ffff9800</color> <color name="notavailable">#fff44336</color> + <color name="warning_button">#fffcd9d6</color> </resources> |