From d112344780ac07ac2817edd2fa4cff5f502ff54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Wed, 28 Jan 2015 15:09:19 +0100 Subject: [PATCH] Smaller sidebar --- .../k9/mailstore/LocalMessageExtractor.java | 2 +- .../k9/ui/messageview/OpenPgpHeaderView.java | 13 +++++++----- .../src/main/res/layout/message_container.xml | 4 ++-- .../layout/message_view_openpgp_header.xml | 20 ++++++------------- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java b/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java index 5c2eeeb39..cae059450 100644 --- a/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java +++ b/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java @@ -435,7 +435,7 @@ public class LocalMessageExtractor { // TODO correctly extract OpenPgpSignatureResult and add to MessageViewContainer OpenPgpSignatureResult result = null; -// result = new OpenPgpSignatureResult(OpenPgpSignatureResult.SIGNATURE_SUCCESS_CERTIFIED, "lul", false, 0x123); + result = new OpenPgpSignatureResult(OpenPgpSignatureResult.SIGNATURE_SUCCESS_CERTIFIED, "lul", false, 0x123); containers.add(new MessageViewContainer(viewable.html, attachmentInfos, result, true, null)); } diff --git a/k9mail/src/main/java/com/fsck/k9/ui/messageview/OpenPgpHeaderView.java b/k9mail/src/main/java/com/fsck/k9/ui/messageview/OpenPgpHeaderView.java index 7e9fdfa73..9baa7df46 100644 --- a/k9mail/src/main/java/com/fsck/k9/ui/messageview/OpenPgpHeaderView.java +++ b/k9mail/src/main/java/com/fsck/k9/ui/messageview/OpenPgpHeaderView.java @@ -5,6 +5,7 @@ import android.content.Context; import android.graphics.PorterDuff; import android.util.AttributeSet; import android.view.View; +import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -12,6 +13,7 @@ import android.widget.TextView; import com.fsck.k9.R; import org.openintents.openpgp.OpenPgpSignatureResult; +import org.openintents.openpgp.util.OpenPgpUtils; public class OpenPgpHeaderView extends LinearLayout { private OpenPgpSignatureResult signatureResult; @@ -26,6 +28,7 @@ public class OpenPgpHeaderView extends LinearLayout { private LinearLayout mResultSignatureLayout; private TextView mResultSignatureName; private TextView mResultSignatureEmail; + private Button mResultSignatureButton; // private PendingIntent mMissingKeyPI; // private static final int REQUEST_CODE_DECRYPT_VERIFY = 12; @@ -51,6 +54,7 @@ public class OpenPgpHeaderView extends LinearLayout { mResultSignatureLayout = (LinearLayout) findViewById(R.id.result_signature_layout); mResultSignatureName = (TextView) findViewById(R.id.result_signature_name); mResultSignatureEmail = (TextView) findViewById(R.id.result_signature_email); + mResultSignatureButton = (Button) findViewById(R.id.result_signature_button); // mGetKeyButton.setOnClickListener(new OnClickListener() { // @Override @@ -82,8 +86,7 @@ public class OpenPgpHeaderView extends LinearLayout { setStatusImage(mContext, mResultSignatureIcon, mResultSignatureText, STATE_INVALID); mResultSignatureText.setText(R.string.openpgp_result_invalid_signature); -// mGetKeyButton.setVisibility(View.GONE); -// mSignatureStatusImage.setImageResource(R.drawable.overlay_error); + mResultSignatureButton.setVisibility(View.GONE); mResultSignatureLayout.setVisibility(View.GONE); break; } @@ -91,9 +94,9 @@ public class OpenPgpHeaderView extends LinearLayout { setStatusImage(mContext, mResultSignatureIcon, mResultSignatureText, STATE_VERIFIED); mResultSignatureText.setText(R.string.openpgp_result_signature_certified); -// mGetKeyButton.setVisibility(View.GONE); -// mSignatureUserId.setText(signatureResult.getUserId()); -// mSignatureStatusImage.setImageResource(R.drawable.overlay_ok); + mResultSignatureButton.setVisibility(View.VISIBLE); + mResultSignatureName.setText(OpenPgpUtils.s); + mResultSignatureEmail.setText(signatureResult.getUserId()); mResultSignatureLayout.setVisibility(View.VISIBLE); break; diff --git a/k9mail/src/main/res/layout/message_container.xml b/k9mail/src/main/res/layout/message_container.xml index a27fb2819..bddefe3ef 100644 --- a/k9mail/src/main/res/layout/message_container.xml +++ b/k9mail/src/main/res/layout/message_container.xml @@ -20,8 +20,8 @@ @@ -78,7 +78,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:clickable="true" - android:layout_marginLeft="16dp" + android:layout_marginLeft="14dp" android:paddingRight="4dp" android:orientation="horizontal"> @@ -107,16 +107,8 @@ - -