Use new icons in other key related activites, delete old icons
|
@ -20,6 +20,7 @@ package org.sufficientlysecure.keychain.ui;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -37,6 +38,7 @@ import android.widget.ArrayAdapter;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -64,7 +66,8 @@ import java.util.ArrayList;
|
||||||
*/
|
*/
|
||||||
public class CertifyKeyActivity extends ActionBarActivity implements
|
public class CertifyKeyActivity extends ActionBarActivity implements
|
||||||
SelectSecretKeyLayoutFragment.SelectSecretKeyCallback, LoaderManager.LoaderCallbacks<Cursor> {
|
SelectSecretKeyLayoutFragment.SelectSecretKeyCallback, LoaderManager.LoaderCallbacks<Cursor> {
|
||||||
private View mSignButton;
|
private View mCertifyButton;
|
||||||
|
private ImageView mActionCertifyImage;
|
||||||
private CheckBox mUploadKeyCheckbox;
|
private CheckBox mUploadKeyCheckbox;
|
||||||
private Spinner mSelectKeyserverSpinner;
|
private Spinner mSelectKeyserverSpinner;
|
||||||
|
|
||||||
|
@ -88,10 +91,19 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||||
|
|
||||||
mSelectKeyFragment = (SelectSecretKeyLayoutFragment) getSupportFragmentManager()
|
mSelectKeyFragment = (SelectSecretKeyLayoutFragment) getSupportFragmentManager()
|
||||||
.findFragmentById(R.id.sign_key_select_key_fragment);
|
.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.setCallback(this);
|
||||||
mSelectKeyFragment.setFilterCertify(true);
|
mSelectKeyFragment.setFilterCertify(true);
|
||||||
|
|
||||||
mSelectKeyserverSpinner = (Spinner) findViewById(R.id.upload_key_keyserver);
|
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
|
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
|
||||||
android.R.layout.simple_spinner_item, Preferences.getPreferences(this)
|
android.R.layout.simple_spinner_item, Preferences.getPreferences(this)
|
||||||
.getKeyServers()
|
.getKeyServers()
|
||||||
|
@ -99,7 +111,6 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
mSelectKeyserverSpinner.setAdapter(adapter);
|
mSelectKeyserverSpinner.setAdapter(adapter);
|
||||||
|
|
||||||
mUploadKeyCheckbox = (CheckBox) findViewById(R.id.sign_key_upload_checkbox);
|
|
||||||
if (!mUploadKeyCheckbox.isChecked()) {
|
if (!mUploadKeyCheckbox.isChecked()) {
|
||||||
mSelectKeyserverSpinner.setEnabled(false);
|
mSelectKeyserverSpinner.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -118,8 +129,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mSignButton = findViewById(R.id.sign_key_sign_button);
|
mCertifyButton.setOnClickListener(new OnClickListener() {
|
||||||
mSignButton.setOnClickListener(new OnClickListener() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -141,7 +151,6 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||||
}
|
}
|
||||||
Log.e(Constants.TAG, "uri: " + mDataUri);
|
Log.e(Constants.TAG, "uri: " + mDataUri);
|
||||||
|
|
||||||
mUserIds = (ListView) findViewById(R.id.view_key_user_ids);
|
|
||||||
|
|
||||||
mUserIdsAdapter = new UserIdsAdapter(this, null, 0, true);
|
mUserIdsAdapter = new UserIdsAdapter(this, null, 0, true);
|
||||||
mUserIds.setAdapter(mUserIdsAdapter);
|
mUserIds.setAdapter(mUserIdsAdapter);
|
||||||
|
@ -230,7 +239,8 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||||
startSigning();
|
startSigning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
// bail out; need to wait until the user has entered the passphrase before trying again
|
// bail out; need to wait until the user has entered the passphrase before trying again
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -493,19 +493,19 @@ public class KeyListFragment extends LoaderFragment
|
||||||
// Note: order is important!
|
// Note: order is important!
|
||||||
if (isRevoked) {
|
if (isRevoked) {
|
||||||
h.mStatus.setImageDrawable(
|
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),
|
h.mStatus.setColorFilter(getResources().getColor(R.color.result_red),
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
h.mStatus.setVisibility(View.VISIBLE);
|
h.mStatus.setVisibility(View.VISIBLE);
|
||||||
} else if (isExpired) {
|
} else if (isExpired) {
|
||||||
h.mStatus.setImageDrawable(
|
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),
|
h.mStatus.setColorFilter(getResources().getColor(R.color.result_orange),
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
h.mStatus.setVisibility(View.VISIBLE);
|
h.mStatus.setVisibility(View.VISIBLE);
|
||||||
} else if (isVerified) {
|
} else if (isVerified) {
|
||||||
h.mStatus.setImageDrawable(
|
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),
|
h.mStatus.setColorFilter(getResources().getColor(R.color.result_green),
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
h.mStatus.setVisibility(View.VISIBLE);
|
h.mStatus.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -531,7 +531,7 @@ public class ViewKeyActivity extends ActionBarActivity implements
|
||||||
mStatusText.setText(R.string.view_key_revoked);
|
mStatusText.setText(R.string.view_key_revoked);
|
||||||
mStatusText.setTextColor(getResources().getColor(R.color.result_red));
|
mStatusText.setTextColor(getResources().getColor(R.color.result_red));
|
||||||
mStatusImage.setImageDrawable(
|
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),
|
mStatusImage.setColorFilter(getResources().getColor(R.color.result_red),
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
mStatusDivider.setVisibility(View.VISIBLE);
|
mStatusDivider.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -19,6 +19,8 @@ package org.sufficientlysecure.keychain.ui.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.support.v4.widget.CursorAdapter;
|
import android.support.v4.widget.CursorAdapter;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -156,7 +158,10 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC
|
||||||
|
|
||||||
if (isRevoked) {
|
if (isRevoked) {
|
||||||
// set revocation icon (can this even be primary?)
|
// 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
|
// disable and strike through text for revoked user ids
|
||||||
vName.setEnabled(false);
|
vName.setEnabled(false);
|
||||||
|
@ -170,22 +175,33 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC
|
||||||
vAddress.setEnabled(true);
|
vAddress.setEnabled(true);
|
||||||
vComment.setEnabled(true);
|
vComment.setEnabled(true);
|
||||||
|
|
||||||
// verified: has been verified
|
if (isPrimary) {
|
||||||
// isPrimary: show small star icon for primary user ids
|
vName.setTypeface(null, Typeface.BOLD);
|
||||||
int verified = cursor.getInt(INDEX_VERIFIED);
|
vAddress.setTypeface(null, Typeface.BOLD);
|
||||||
switch (verified) {
|
} else {
|
||||||
|
vName.setTypeface(null, Typeface.NORMAL);
|
||||||
|
vAddress.setTypeface(null, Typeface.NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
int isVerified = cursor.getInt(INDEX_VERIFIED);
|
||||||
|
switch (isVerified) {
|
||||||
case Certs.VERIFIED_SECRET:
|
case Certs.VERIFIED_SECRET:
|
||||||
vVerified.setImageResource(isPrimary
|
vVerified.setImageResource(R.drawable.status_signature_verified_cutout);
|
||||||
? R.drawable.key_certify_primary_ok_depth0
|
vVerified.setColorFilter(
|
||||||
: R.drawable.key_certify_ok_depth0);
|
mContext.getResources().getColor(R.color.result_green),
|
||||||
|
PorterDuff.Mode.SRC_IN);
|
||||||
break;
|
break;
|
||||||
case Certs.VERIFIED_SELF:
|
case Certs.VERIFIED_SELF:
|
||||||
vVerified.setImageResource(isPrimary
|
vVerified.setImageResource(R.drawable.status_signature_unverified_cutout);
|
||||||
? R.drawable.key_certify_primary_ok_self
|
vVerified.setColorFilter(
|
||||||
: R.drawable.key_certify_ok_self);
|
mContext.getResources().getColor(R.color.bg_gray),
|
||||||
|
PorterDuff.Mode.SRC_IN);
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 898 B |
Before Width: | Height: | Size: 900 B |
Before Width: | Height: | Size: 757 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 652 B |
Before Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 853 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 940 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
|
@ -106,7 +106,6 @@
|
||||||
style="@style/SectionHeader"
|
style="@style/SectionHeader"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:text="@string/section_uids_to_certify" />
|
android:text="@string/section_uids_to_certify" />
|
||||||
|
|
||||||
|
@ -149,21 +148,35 @@
|
||||||
android:text="@string/section_actions"
|
android:text="@string/section_actions"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/sign_key_sign_button"
|
android:id="@+id/certify_key_certify_button"
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||||
|
android:clickable="true"
|
||||||
|
android:paddingRight="4dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
style="@style/SelectableItem"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:layout_width="0dip"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="@string/key_view_action_certify"
|
android:text="@string/key_view_action_certify"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
android:layout_weight="1"
|
||||||
android:drawableRight="@drawable/ic_action_good"
|
android:gravity="center_vertical" />
|
||||||
android:drawablePadding="8dp"
|
|
||||||
android:gravity="center_vertical"
|
<ImageView
|
||||||
android:clickable="true"
|
android:id="@+id/certify_key_action_certify_image"
|
||||||
style="@style/SelectableItem" />
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:src="@drawable/status_signature_verified_cutout"
|
||||||
|
android:layout_gravity="center_vertical" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -35,21 +35,6 @@
|
||||||
android:layout_height="1dip"
|
android:layout_height="1dip"
|
||||||
android:background="?android:attr/listDivider" />
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
<!--<TextView-->
|
|
||||||
<!--android:id="@+id/view_key_action_certify"-->
|
|
||||||
<!--android:paddingLeft="8dp"-->
|
|
||||||
<!--android:paddingRight="8dp"-->
|
|
||||||
<!--android:textAppearance="?android:attr/textAppearanceMedium"-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="match_parent"-->
|
|
||||||
<!--android:text="@string/key_view_action_certify"-->
|
|
||||||
<!--android:minHeight="?android:attr/listPreferredItemHeight"-->
|
|
||||||
<!--android:drawableRight="@drawable/ic_action_good"-->
|
|
||||||
<!--android:drawablePadding="8dp"-->
|
|
||||||
<!--android:gravity="center_vertical"-->
|
|
||||||
<!--android:clickable="true"-->
|
|
||||||
<!--style="@style/SelectableItem" />-->
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/view_key_action_certify"
|
android:id="@+id/view_key_action_certify"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -64,9 +64,9 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/edit_image"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/edit_image"
|
|
||||||
android:src="@drawable/ic_action_edit"
|
android:src="@drawable/ic_action_edit"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:layout_gravity="center_horizontal" />
|
android:layout_gravity="center_horizontal" />
|
||||||
|
|