diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-10-23 23:31:28 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-10-23 23:31:28 +0200 |
commit | 76a1e99d7e30679722ffe2cb0c8c12b048adc369 (patch) | |
tree | d488809449e0465d82f187f54d083b042ab930a8 | |
parent | 214b60cd0049c90ea120401646c9d9ae707dc4ad (diff) | |
parent | ecfa2288eb58c631900261270a99c8dcf27b4b4d (diff) | |
download | open-keychain-76a1e99d7e30679722ffe2cb0c8c12b048adc369.tar.gz open-keychain-76a1e99d7e30679722ffe2cb0c8c12b048adc369.tar.bz2 open-keychain-76a1e99d7e30679722ffe2cb0c8c12b048adc369.zip |
Merge branch 'development' of github.com:open-keychain/open-keychain into development
13 files changed, 93 insertions, 61 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java index ec9509768..cacceb5d0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java @@ -23,6 +23,7 @@ import android.app.Application; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.content.res.Resources; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Build; @@ -139,16 +140,20 @@ public class KeychainApplication extends Application { } static void brandGlowEffect(Context context, int brandColor) { - // terrible hack to brand the edge overscroll glow effect - // https://gist.github.com/menny/7878762#file-brandgloweffect_full-java - - //glow - int glowDrawableId = context.getResources().getIdentifier("overscroll_glow", "drawable", "android"); - Drawable androidGlow = context.getResources().getDrawable(glowDrawableId); - androidGlow.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN); - //edge - int edgeDrawableId = context.getResources().getIdentifier("overscroll_edge", "drawable", "android"); - Drawable androidEdge = context.getResources().getDrawable(edgeDrawableId); - androidEdge.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN); + try { + // terrible hack to brand the edge overscroll glow effect + // https://gist.github.com/menny/7878762#file-brandgloweffect_full-java + + //glow + int glowDrawableId = context.getResources().getIdentifier("overscroll_glow", "drawable", "android"); + Drawable androidGlow = context.getResources().getDrawable(glowDrawableId); + androidGlow.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN); + //edge + int edgeDrawableId = context.getResources().getIdentifier("overscroll_edge", "drawable", "android"); + Drawable androidEdge = context.getResources().getDrawable(edgeDrawableId); + androidEdge.setColorFilter(brandColor, PorterDuff.Mode.SRC_IN); + } catch (Resources.NotFoundException e) { + // no hack on Android 5 + } } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java index 2b2fbf4c2..a3ddd5325 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java @@ -41,6 +41,7 @@ import org.sufficientlysecure.keychain.util.IterableIterator; import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Utf8Util; +import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -160,11 +161,15 @@ public class UncachedKeyRing { } try { - while(stream.available() > 0) { + while (stream.available() > 0) { // if there are no objects left from the last factory, create a new one if (mObjectFactory == null) { - mObjectFactory = new PGPObjectFactory(PGPUtil.getDecoderStream(stream), - new JcaKeyFingerprintCalculator()); + InputStream in = PGPUtil.getDecoderStream(stream); + if (!BufferedInputStream.class.isInstance(in)) { + in = new BufferedInputStream(in); + } + + mObjectFactory = new PGPObjectFactory(in, new JcaKeyFingerprintCalculator()); } // go through all objects in this block @@ -184,9 +189,10 @@ public class UncachedKeyRing { mObjectFactory = null; } } catch (IOException e) { - Log.e(Constants.TAG, "IOException while processing stream", e); + Log.e(Constants.TAG, "IOException while processing stream. ArmoredInputStream CRC check failed?", e); + } catch (ArrayIndexOutOfBoundsException e) { + Log.e(Constants.TAG, "ArmoredInputStream decode failed, symbol is not in decodingTable!", e); } - } @Override 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 b886fc69c..0b28a2594 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java @@ -24,6 +24,7 @@ import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.graphics.Color; +import android.graphics.PorterDuff; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -51,11 +52,10 @@ import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AbsListView.MultiChoiceModeListener; import android.widget.AdapterView; -import android.widget.ArrayAdapter; import android.widget.Button; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; -import android.widget.Spinner; import android.widget.TextView; import org.sufficientlysecure.keychain.Constants; @@ -84,7 +84,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; -import java.util.List; import edu.cmu.cylab.starslinger.exchange.ExchangeActivity; import edu.cmu.cylab.starslinger.exchange.ExchangeConfig; @@ -585,18 +584,22 @@ public class KeyListFragment extends LoaderFragment TextView mMainUserIdRest; ImageView mStatus; View mSlinger; + ImageButton mSlingerButton; } @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { View view = mInflater.inflate(R.layout.key_list_item, parent, false); final ItemViewHolder holder = new ItemViewHolder(); - holder.mMainUserId = (TextView) view.findViewById(R.id.mainUserId); - holder.mMainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest); - holder.mStatus = (ImageView) view.findViewById(R.id.status_icon); - holder.mSlinger = view.findViewById(R.id.slinger_view); + holder.mMainUserId = (TextView) view.findViewById(R.id.key_list_item_name); + holder.mMainUserIdRest = (TextView) view.findViewById(R.id.key_list_item_email); + holder.mStatus = (ImageView) view.findViewById(R.id.key_list_item_status_icon); + holder.mSlinger = view.findViewById(R.id.key_list_item_slinger_view); + holder.mSlingerButton = (ImageButton) view.findViewById(R.id.key_list_item_slinger_button); + holder.mSlingerButton.setColorFilter(context.getResources().getColor(R.color.tertiary_text_light), + PorterDuff.Mode.SRC_IN); view.setTag(holder); - view.findViewById(R.id.slinger_button).setOnClickListener(new OnClickListener() { + view.findViewById(R.id.key_list_item_slinger_button).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (holder.mMasterKeyId != null) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyShareFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyShareFragment.java index 1efd2c935..e7f1be3f2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyShareFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyShareFragment.java @@ -21,6 +21,7 @@ import android.annotation.TargetApi; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; +import android.graphics.PorterDuff; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; @@ -33,6 +34,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.AlphaAnimation; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; @@ -68,7 +70,7 @@ public class ViewKeyShareFragment extends LoaderFragment implements private View mFingerprintClipboardButton; private View mKeyShareButton; private View mKeyClipboardButton; - private View mKeySafeSlingerButton; + private ImageButton mKeySafeSlingerButton; private View mNfcHelpButton; private View mNfcPrefsButton; private View mKeyUploadButton; @@ -96,11 +98,14 @@ public class ViewKeyShareFragment extends LoaderFragment implements mFingerprintClipboardButton = view.findViewById(R.id.view_key_action_fingerprint_clipboard); mKeyShareButton = view.findViewById(R.id.view_key_action_key_share); mKeyClipboardButton = view.findViewById(R.id.view_key_action_key_clipboard); - mKeySafeSlingerButton = view.findViewById(R.id.view_key_action_key_safeslinger); + mKeySafeSlingerButton = (ImageButton) view.findViewById(R.id.view_key_action_key_safeslinger); mNfcHelpButton = view.findViewById(R.id.view_key_action_nfc_help); mNfcPrefsButton = view.findViewById(R.id.view_key_action_nfc_prefs); mKeyUploadButton = view.findViewById(R.id.view_key_action_upload); + mKeySafeSlingerButton.setColorFilter(getResources().getColor(R.color.tertiary_text_light), + PorterDuff.Mode.SRC_IN); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { mNfcPrefsButton.setVisibility(View.VISIBLE); } else { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java index aabb310d0..a9795cdd1 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java @@ -169,18 +169,27 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { } if (entry.isRevoked()) { - holder.status.setVisibility(View.VISIBLE); - KeyFormattingUtils.setStatusImage(getContext(), holder.status, KeyFormattingUtils.STATE_REVOKED); - // no more space for algorithm display - holder.algorithm.setVisibility(View.GONE); + KeyFormattingUtils.setStatusImage(getContext(), holder.status, null, KeyFormattingUtils.STATE_REVOKED, true); } else if (entry.isExpired()) { + KeyFormattingUtils.setStatusImage(getContext(), holder.status, null, KeyFormattingUtils.STATE_EXPIRED, true); + } + + if (entry.isRevoked() || entry.isExpired()) { holder.status.setVisibility(View.VISIBLE); - KeyFormattingUtils.setStatusImage(getContext(), holder.status, KeyFormattingUtils.STATE_EXPIRED); + // no more space for algorithm display holder.algorithm.setVisibility(View.GONE); + + holder.mainUserId.setTextColor(getContext().getResources().getColor(R.color.bg_gray)); + holder.mainUserIdRest.setTextColor(getContext().getResources().getColor(R.color.bg_gray)); + holder.keyId.setTextColor(getContext().getResources().getColor(R.color.bg_gray)); } else { holder.status.setVisibility(View.GONE); holder.algorithm.setVisibility(View.VISIBLE); + + holder.mainUserId.setTextColor(getContext().getResources().getColor(R.color.black)); + holder.mainUserIdRest.setTextColor(getContext().getResources().getColor(R.color.black)); + holder.keyId.setTextColor(getContext().getResources().getColor(R.color.black)); } if (entry.getUserIds().size() == 1) { @@ -203,6 +212,12 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { uidView.setText(highlighter.highlight(cUserId)); uidView.setPadding(0, 0, FormattingUtils.dpToPx(getContext(), 8), 0); + if (entry.isRevoked() || entry.isExpired()) { + uidView.setTextColor(getContext().getResources().getColor(R.color.bg_gray)); + } else { + uidView.setTextColor(getContext().getResources().getColor(R.color.black)); + } + holder.userIdsList.addView(uidView); for (String email : cEmails) { @@ -212,6 +227,13 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { FormattingUtils.dpToPx(getContext(), 16), 0, FormattingUtils.dpToPx(getContext(), 8), 0); emailView.setText(highlighter.highlight(email)); + + if (entry.isRevoked() || entry.isExpired()) { + emailView.setTextColor(getContext().getResources().getColor(R.color.bg_gray)); + } else { + emailView.setTextColor(getContext().getResources().getColor(R.color.black)); + } + holder.userIdsList.addView(emailView); } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java index c864c7138..8b6a04b99 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java @@ -152,7 +152,7 @@ abstract public class SelectKeyCursorAdapter extends CursorAdapter { View view = mInflater.inflate(R.layout.select_key_item, null); ViewHolderItem holder = new ViewHolderItem(); holder.view = view; - holder.mainUserId = (TextView) view.findViewById(R.id.mainUserId); + holder.mainUserId = (TextView) view.findViewById(R.id.key_list_item_name); holder.mainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest); holder.keyId = (TextView) view.findViewById(R.id.subkey_item_key_id); holder.statusIcon = (ImageView) view.findViewById(R.id.status_icon); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SubkeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SubkeysAdapter.java index 7bbd3eee3..a032e96fc 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SubkeysAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SubkeysAdapter.java @@ -249,15 +249,11 @@ public class SubkeysAdapter extends CursorAdapter { vKeyExpiry.setText(context.getString(R.string.label_expiry) + ": " + context.getString(R.string.none)); } - // if key is expired or revoked, strike through text + // if key is expired or revoked... boolean isInvalid = isRevoked || isExpired; if (isInvalid) { vStatus.setVisibility(View.VISIBLE); - vKeyId.setText(FormattingUtils.strikeOutText(vKeyId.getText())); - vKeyDetails.setText(FormattingUtils.strikeOutText(vKeyDetails.getText())); - vKeyExpiry.setText(FormattingUtils.strikeOutText(vKeyExpiry.getText())); - vCertifyIcon.setColorFilter( mContext.getResources().getColor(R.color.bg_gray), PorterDuff.Mode.SRC_IN); 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 55ed7c65b..a2e1930d3 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 @@ -166,13 +166,10 @@ public class UserIdsAdapter extends CursorAdapter implements AdapterView.OnItemC // set revocation icon (can this even be primary?) KeyFormattingUtils.setStatusImage(mContext, vVerified, null, KeyFormattingUtils.STATE_REVOKED, true); - // disable and strike through text for revoked user ids + // disable revoked user ids vName.setEnabled(false); vAddress.setEnabled(false); vComment.setEnabled(false); - vName.setText(FormattingUtils.strikeOutText(vName.getText())); - vAddress.setText(FormattingUtils.strikeOutText(vAddress.getText())); - vComment.setText(FormattingUtils.strikeOutText(vComment.getText())); } else { vName.setEnabled(true); vAddress.setEnabled(true); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/CertifyKeySpinner.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/CertifyKeySpinner.java index 0a1a1d75b..6f37f1c72 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/CertifyKeySpinner.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/CertifyKeySpinner.java @@ -102,16 +102,16 @@ public class CertifyKeySpinner extends KeySpinner { @Override boolean setStatus(Context context, Cursor cursor, ImageView statusView) { if (cursor.getInt(mIndexIsRevoked) != 0) { - KeyFormattingUtils.setStatusImage(getContext(), statusView, KeyFormattingUtils.STATE_REVOKED); + KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_REVOKED, true); return false; } if (cursor.getInt(mIndexIsExpired) != 0) { - KeyFormattingUtils.setStatusImage(getContext(), statusView, KeyFormattingUtils.STATE_EXPIRED); + KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_EXPIRED, true); return false; } // don't invalidate the "None" entry, which is also null! if (cursor.getPosition() != 0 && cursor.isNull(mIndexHasCertify)) { - KeyFormattingUtils.setStatusImage(getContext(), statusView, KeyFormattingUtils.STATE_UNAVAILABLE); + KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_UNAVAILABLE, true); return false; } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/SignKeySpinner.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/SignKeySpinner.java index 2f002d470..59d05a62e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/SignKeySpinner.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/widget/SignKeySpinner.java @@ -84,15 +84,15 @@ public class SignKeySpinner extends KeySpinner { @Override boolean setStatus(Context context, Cursor cursor, ImageView statusView) { if (cursor.getInt(mIndexIsRevoked) != 0) { - KeyFormattingUtils.setStatusImage(getContext(), statusView, KeyFormattingUtils.STATE_REVOKED); + KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_REVOKED, true); return false; } if (cursor.getInt(mIndexIsExpired) != 0) { - KeyFormattingUtils.setStatusImage(getContext(), statusView, KeyFormattingUtils.STATE_EXPIRED); + KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_EXPIRED, true); return false; } if (cursor.getInt(mIndexHasSign) == 0) { - KeyFormattingUtils.setStatusImage(getContext(), statusView, KeyFormattingUtils.STATE_UNAVAILABLE); + KeyFormattingUtils.setStatusImage(getContext(), statusView, null, KeyFormattingUtils.STATE_UNAVAILABLE, true); return false; } diff --git a/OpenKeychain/src/main/res/layout/decrypt_result_include.xml b/OpenKeychain/src/main/res/layout/decrypt_result_include.xml index 8a0519872..9140ad07b 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_result_include.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_result_include.xml @@ -6,8 +6,7 @@ android:layout_height="wrap_content" android:background="@color/holo_gray_bright"> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/result_main_layout" + <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -99,7 +98,6 @@ android:textAppearance="?android:attr/textAppearanceSmall" android:layout_width="match_parent" android:layout_height="wrap_content" - android:textColor="@color/tertiary_text_light" android:text="alice@example.com (set in-code)" android:gravity="center_vertical" /> diff --git a/OpenKeychain/src/main/res/layout/decrypt_text_fragment.xml b/OpenKeychain/src/main/res/layout/decrypt_text_fragment.xml index c58e2d7e6..cbe03056c 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_text_fragment.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_text_fragment.xml @@ -98,16 +98,16 @@ android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:text="@string/decrypt_invalid_text" - android:padding="8dp" + android:padding="16dp" android:layout_gravity="center" - android:textColor="@color/android_red_dark" /> + android:textColor="@color/android_red_light" /> <Button android:id="@+id/decrypt_text_invalid_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/button_edgy" - android:textColor="@color/android_red_dark" + android:textColor="@color/android_red_light" android:text="@string/decrypt_invalid_button" android:layout_gravity="center_horizontal" /> </LinearLayout> diff --git a/OpenKeychain/src/main/res/layout/key_list_item.xml b/OpenKeychain/src/main/res/layout/key_list_item.xml index 7428d68e2..df69e4237 100644 --- a/OpenKeychain/src/main/res/layout/key_list_item.xml +++ b/OpenKeychain/src/main/res/layout/key_list_item.xml @@ -22,14 +22,14 @@ android:paddingBottom="4dp"> <TextView - android:id="@+id/mainUserId" + android:id="@+id/key_list_item_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/label_main_user_id" android:textAppearance="?android:attr/textAppearanceMedium" /> <TextView - android:id="@+id/mainUserIdRest" + android:id="@+id/key_list_item_email" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" @@ -39,9 +39,9 @@ </LinearLayout> <LinearLayout - android:id="@+id/slinger_view" + android:id="@+id/key_list_item_slinger_view" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="?android:attr/listPreferredItemHeight" android:layout_gravity="center_vertical" android:orientation="horizontal"> @@ -54,18 +54,18 @@ android:background="?android:attr/listDivider" /> <ImageButton - android:id="@+id/slinger_button" + android:id="@+id/key_list_item_slinger_button" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="match_parent" android:layout_gravity="center" android:src="@drawable/ic_action_safeslinger" - android:padding="16dp" + android:padding="12dp" style="@style/SelectableItem" /> </LinearLayout> <ImageView - android:id="@+id/status_icon" + android:id="@+id/key_list_item_status_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" |