diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java index 7ac229b91..7b888eccb 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyActivity.java @@ -20,6 +20,7 @@ package org.sufficientlysecure.keychain.ui; import android.app.ProgressDialog; import android.content.Intent; import android.database.Cursor; +import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; import android.os.Handler; @@ -37,6 +38,7 @@ import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; +import android.widget.ImageView; import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; @@ -64,7 +66,8 @@ import java.util.ArrayList; */ public class CertifyKeyActivity extends ActionBarActivity implements SelectSecretKeyLayoutFragment.SelectSecretKeyCallback, LoaderManager.LoaderCallbacks { - private View mSignButton; + private View mCertifyButton; + private ImageView mActionCertifyImage; private CheckBox mUploadKeyCheckbox; private Spinner mSelectKeyserverSpinner; @@ -88,10 +91,19 @@ public class CertifyKeyActivity extends ActionBarActivity implements mSelectKeyFragment = (SelectSecretKeyLayoutFragment) getSupportFragmentManager() .findFragmentById(R.id.sign_key_select_key_fragment); + mSelectKeyserverSpinner = (Spinner) findViewById(R.id.upload_key_keyserver); + mUploadKeyCheckbox = (CheckBox) findViewById(R.id.sign_key_upload_checkbox); + mCertifyButton = findViewById(R.id.certify_key_certify_button); + mActionCertifyImage = (ImageView) findViewById(R.id.certify_key_action_certify_image); + mUserIds = (ListView) findViewById(R.id.view_key_user_ids); + + // make certify image gray, like action icons + mActionCertifyImage.setColorFilter(getResources().getColor(R.color.tertiary_text_light), + PorterDuff.Mode.SRC_IN); + mSelectKeyFragment.setCallback(this); mSelectKeyFragment.setFilterCertify(true); - mSelectKeyserverSpinner = (Spinner) findViewById(R.id.upload_key_keyserver); ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, Preferences.getPreferences(this) .getKeyServers() @@ -99,7 +111,6 @@ public class CertifyKeyActivity extends ActionBarActivity implements adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); mSelectKeyserverSpinner.setAdapter(adapter); - mUploadKeyCheckbox = (CheckBox) findViewById(R.id.sign_key_upload_checkbox); if (!mUploadKeyCheckbox.isChecked()) { mSelectKeyserverSpinner.setEnabled(false); } else { @@ -118,8 +129,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements } }); - mSignButton = findViewById(R.id.sign_key_sign_button); - mSignButton.setOnClickListener(new OnClickListener() { + mCertifyButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -141,7 +151,6 @@ public class CertifyKeyActivity extends ActionBarActivity implements } Log.e(Constants.TAG, "uri: " + mDataUri); - mUserIds = (ListView) findViewById(R.id.view_key_user_ids); mUserIdsAdapter = new UserIdsAdapter(this, null, 0, true); mUserIds.setAdapter(mUserIdsAdapter); @@ -230,7 +239,8 @@ public class CertifyKeyActivity extends ActionBarActivity implements startSigning(); } } - }); + } + ); // bail out; need to wait until the user has entered the passphrase before trying again return; } else { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java index 5c74b6602..e2321ccf2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -493,19 +493,19 @@ public class KeyListFragment extends LoaderFragment // Note: order is important! if (isRevoked) { h.mStatus.setImageDrawable( - getResources().getDrawable(R.drawable.status_signature_revoked)); + getResources().getDrawable(R.drawable.status_signature_revoked_cutout)); h.mStatus.setColorFilter(getResources().getColor(R.color.result_red), PorterDuff.Mode.SRC_ATOP); h.mStatus.setVisibility(View.VISIBLE); } else if (isExpired) { h.mStatus.setImageDrawable( - getResources().getDrawable(R.drawable.status_signature_expired)); + getResources().getDrawable(R.drawable.status_signature_expired_cutout)); h.mStatus.setColorFilter(getResources().getColor(R.color.result_orange), PorterDuff.Mode.SRC_ATOP); h.mStatus.setVisibility(View.VISIBLE); } else if (isVerified) { h.mStatus.setImageDrawable( - getResources().getDrawable(R.drawable.status_signature_verified)); + getResources().getDrawable(R.drawable.status_signature_verified_cutout)); h.mStatus.setColorFilter(getResources().getColor(R.color.result_green), PorterDuff.Mode.SRC_ATOP); h.mStatus.setVisibility(View.VISIBLE); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index d18a63948..c64cfe417 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -531,7 +531,7 @@ public class ViewKeyActivity extends ActionBarActivity implements mStatusText.setText(R.string.view_key_revoked); mStatusText.setTextColor(getResources().getColor(R.color.result_red)); mStatusImage.setImageDrawable( - getResources().getDrawable(R.drawable.status_signature_revoked)); + getResources().getDrawable(R.drawable.status_signature_revoked_cutout)); mStatusImage.setColorFilter(getResources().getColor(R.color.result_red), PorterDuff.Mode.SRC_ATOP); mStatusDivider.setVisibility(View.VISIBLE); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java index 18312660a..6519915fa 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java @@ -19,6 +19,8 @@ package org.sufficientlysecure.keychain.ui.adapter; import android.content.Context; import android.database.Cursor; +import android.graphics.PorterDuff; +import android.graphics.Typeface; import android.support.v4.widget.CursorAdapter; import android.view.LayoutInflater; import android.view.View; @@ -156,7 +158,10 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC if (isRevoked) { // set revocation icon (can this even be primary?) - vVerified.setImageResource(R.drawable.key_certify_revoke); + vVerified.setImageResource(R.drawable.status_signature_revoked_cutout); + vVerified.setColorFilter( + mContext.getResources().getColor(R.color.bg_gray), + PorterDuff.Mode.SRC_IN); // disable and strike through text for revoked user ids vName.setEnabled(false); @@ -170,22 +175,33 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC vAddress.setEnabled(true); vComment.setEnabled(true); - // verified: has been verified - // isPrimary: show small star icon for primary user ids - int verified = cursor.getInt(INDEX_VERIFIED); - switch (verified) { + if (isPrimary) { + vName.setTypeface(null, Typeface.BOLD); + vAddress.setTypeface(null, Typeface.BOLD); + } else { + vName.setTypeface(null, Typeface.NORMAL); + vAddress.setTypeface(null, Typeface.NORMAL); + } + + int isVerified = cursor.getInt(INDEX_VERIFIED); + switch (isVerified) { case Certs.VERIFIED_SECRET: - vVerified.setImageResource(isPrimary - ? R.drawable.key_certify_primary_ok_depth0 - : R.drawable.key_certify_ok_depth0); + vVerified.setImageResource(R.drawable.status_signature_verified_cutout); + vVerified.setColorFilter( + mContext.getResources().getColor(R.color.result_green), + PorterDuff.Mode.SRC_IN); break; case Certs.VERIFIED_SELF: - vVerified.setImageResource(isPrimary - ? R.drawable.key_certify_primary_ok_self - : R.drawable.key_certify_ok_self); + vVerified.setImageResource(R.drawable.status_signature_unverified_cutout); + vVerified.setColorFilter( + mContext.getResources().getColor(R.color.bg_gray), + PorterDuff.Mode.SRC_IN); break; default: - vVerified.setImageResource(R.drawable.key_certify_error); + vVerified.setImageResource(R.drawable.status_signature_invalid_cutout); + vVerified.setColorFilter( + mContext.getResources().getColor(R.color.result_red), + PorterDuff.Mode.SRC_IN); break; } } diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_error.png b/OpenKeychain/src/main/res/drawable-hdpi/key_certify_error.png deleted file mode 100644 index 391d1c988..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_error.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_ok_depth0.png b/OpenKeychain/src/main/res/drawable-hdpi/key_certify_ok_depth0.png deleted file mode 100644 index 76944469c..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_ok_self.png b/OpenKeychain/src/main/res/drawable-hdpi/key_certify_ok_self.png deleted file mode 100644 index 815701015..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_primary_ok_depth0.png b/OpenKeychain/src/main/res/drawable-hdpi/key_certify_primary_ok_depth0.png deleted file mode 100644 index 026869c14..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_primary_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_primary_ok_self.png b/OpenKeychain/src/main/res/drawable-hdpi/key_certify_primary_ok_self.png deleted file mode 100644 index 12d2e026e..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_primary_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_revoke.png b/OpenKeychain/src/main/res/drawable-hdpi/key_certify_revoke.png deleted file mode 100644 index c39d3a87c..000000000 Binary files a/OpenKeychain/src/main/res/drawable-hdpi/key_certify_revoke.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_error.png b/OpenKeychain/src/main/res/drawable-ldpi/key_certify_error.png deleted file mode 100644 index 79fddf78a..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_error.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_ok_depth0.png b/OpenKeychain/src/main/res/drawable-ldpi/key_certify_ok_depth0.png deleted file mode 100644 index c400a1820..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_ok_self.png b/OpenKeychain/src/main/res/drawable-ldpi/key_certify_ok_self.png deleted file mode 100644 index fb1654b53..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_revoke.png b/OpenKeychain/src/main/res/drawable-ldpi/key_certify_revoke.png deleted file mode 100644 index 5228a4b6b..000000000 Binary files a/OpenKeychain/src/main/res/drawable-ldpi/key_certify_revoke.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_error.png b/OpenKeychain/src/main/res/drawable-mdpi/key_certify_error.png deleted file mode 100644 index 6def8769f..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_error.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_ok_depth0.png b/OpenKeychain/src/main/res/drawable-mdpi/key_certify_ok_depth0.png deleted file mode 100644 index e16ec810a..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_ok_self.png b/OpenKeychain/src/main/res/drawable-mdpi/key_certify_ok_self.png deleted file mode 100644 index 715a16487..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_primary_ok_depth0.png b/OpenKeychain/src/main/res/drawable-mdpi/key_certify_primary_ok_depth0.png deleted file mode 100644 index c376a2897..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_primary_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_primary_ok_self.png b/OpenKeychain/src/main/res/drawable-mdpi/key_certify_primary_ok_self.png deleted file mode 100644 index 45a261b24..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_primary_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_revoke.png b/OpenKeychain/src/main/res/drawable-mdpi/key_certify_revoke.png deleted file mode 100644 index 62ee0ca42..000000000 Binary files a/OpenKeychain/src/main/res/drawable-mdpi/key_certify_revoke.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_error.png b/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_error.png deleted file mode 100644 index 8278ce2b6..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_error.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_ok_depth0.png b/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_ok_depth0.png deleted file mode 100644 index e2aef1177..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_ok_self.png b/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_ok_self.png deleted file mode 100644 index 9bb6ceffa..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_primary_ok_depth0.png b/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_primary_ok_depth0.png deleted file mode 100644 index de6614246..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_primary_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_primary_ok_self.png b/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_primary_ok_self.png deleted file mode 100644 index ce10da099..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_primary_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_revoke.png b/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_revoke.png deleted file mode 100644 index 1478e726b..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xhdpi/key_certify_revoke.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_error.png b/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_error.png deleted file mode 100644 index 9416720eb..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_error.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_ok_depth0.png b/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_ok_depth0.png deleted file mode 100644 index 501a75d63..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_ok_self.png b/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_ok_self.png deleted file mode 100644 index 72ada9c1f..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_primary_ok_depth0.png b/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_primary_ok_depth0.png deleted file mode 100644 index 1b52ef04d..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_primary_ok_depth0.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_primary_ok_self.png b/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_primary_ok_self.png deleted file mode 100644 index baa1c00d2..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_primary_ok_self.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_revoke.png b/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_revoke.png deleted file mode 100644 index 217f4e914..000000000 Binary files a/OpenKeychain/src/main/res/drawable-xxhdpi/key_certify_revoke.png and /dev/null differ diff --git a/OpenKeychain/src/main/res/layout/certify_key_activity.xml b/OpenKeychain/src/main/res/layout/certify_key_activity.xml index 1443ffd46..d9c1b806b 100644 --- a/OpenKeychain/src/main/res/layout/certify_key_activity.xml +++ b/OpenKeychain/src/main/res/layout/certify_key_activity.xml @@ -106,7 +106,6 @@ style="@style/SectionHeader" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="4dp" android:layout_marginTop="14dp" android:text="@string/section_uids_to_certify" /> @@ -149,21 +148,35 @@ android:text="@string/section_actions" android:layout_weight="1" /> - + android:paddingRight="4dp" + android:layout_marginBottom="8dp" + style="@style/SelectableItem" + android:orientation="horizontal"> + + + + + + + diff --git a/OpenKeychain/src/main/res/layout/view_key_main_fragment.xml b/OpenKeychain/src/main/res/layout/view_key_main_fragment.xml index 56441774f..b11538ba9 100644 --- a/OpenKeychain/src/main/res/layout/view_key_main_fragment.xml +++ b/OpenKeychain/src/main/res/layout/view_key_main_fragment.xml @@ -35,21 +35,6 @@ android:layout_height="1dip" android:background="?android:attr/listDivider" /> - - - - - - - - - - - - - - -