1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Smaller sidebar

This commit is contained in:
Dominik Schürmann 2015-01-28 15:09:19 +01:00
parent 28e9c2a8ec
commit d112344780
4 changed files with 17 additions and 22 deletions

View File

@ -435,7 +435,7 @@ public class LocalMessageExtractor {
// TODO correctly extract OpenPgpSignatureResult and add to MessageViewContainer // TODO correctly extract OpenPgpSignatureResult and add to MessageViewContainer
OpenPgpSignatureResult result = null; 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)); containers.add(new MessageViewContainer(viewable.html, attachmentInfos, result, true, null));
} }

View File

@ -5,6 +5,7 @@ import android.content.Context;
import android.graphics.PorterDuff; import android.graphics.PorterDuff;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View; import android.view.View;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@ -12,6 +13,7 @@ import android.widget.TextView;
import com.fsck.k9.R; import com.fsck.k9.R;
import org.openintents.openpgp.OpenPgpSignatureResult; import org.openintents.openpgp.OpenPgpSignatureResult;
import org.openintents.openpgp.util.OpenPgpUtils;
public class OpenPgpHeaderView extends LinearLayout { public class OpenPgpHeaderView extends LinearLayout {
private OpenPgpSignatureResult signatureResult; private OpenPgpSignatureResult signatureResult;
@ -26,6 +28,7 @@ public class OpenPgpHeaderView extends LinearLayout {
private LinearLayout mResultSignatureLayout; private LinearLayout mResultSignatureLayout;
private TextView mResultSignatureName; private TextView mResultSignatureName;
private TextView mResultSignatureEmail; private TextView mResultSignatureEmail;
private Button mResultSignatureButton;
// private PendingIntent mMissingKeyPI; // private PendingIntent mMissingKeyPI;
// private static final int REQUEST_CODE_DECRYPT_VERIFY = 12; // 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); mResultSignatureLayout = (LinearLayout) findViewById(R.id.result_signature_layout);
mResultSignatureName = (TextView) findViewById(R.id.result_signature_name); mResultSignatureName = (TextView) findViewById(R.id.result_signature_name);
mResultSignatureEmail = (TextView) findViewById(R.id.result_signature_email); mResultSignatureEmail = (TextView) findViewById(R.id.result_signature_email);
mResultSignatureButton = (Button) findViewById(R.id.result_signature_button);
// mGetKeyButton.setOnClickListener(new OnClickListener() { // mGetKeyButton.setOnClickListener(new OnClickListener() {
// @Override // @Override
@ -82,8 +86,7 @@ public class OpenPgpHeaderView extends LinearLayout {
setStatusImage(mContext, mResultSignatureIcon, mResultSignatureText, STATE_INVALID); setStatusImage(mContext, mResultSignatureIcon, mResultSignatureText, STATE_INVALID);
mResultSignatureText.setText(R.string.openpgp_result_invalid_signature); mResultSignatureText.setText(R.string.openpgp_result_invalid_signature);
// mGetKeyButton.setVisibility(View.GONE); mResultSignatureButton.setVisibility(View.GONE);
// mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
mResultSignatureLayout.setVisibility(View.GONE); mResultSignatureLayout.setVisibility(View.GONE);
break; break;
} }
@ -91,9 +94,9 @@ public class OpenPgpHeaderView extends LinearLayout {
setStatusImage(mContext, mResultSignatureIcon, mResultSignatureText, STATE_VERIFIED); setStatusImage(mContext, mResultSignatureIcon, mResultSignatureText, STATE_VERIFIED);
mResultSignatureText.setText(R.string.openpgp_result_signature_certified); mResultSignatureText.setText(R.string.openpgp_result_signature_certified);
// mGetKeyButton.setVisibility(View.GONE); mResultSignatureButton.setVisibility(View.VISIBLE);
// mSignatureUserId.setText(signatureResult.getUserId()); mResultSignatureName.setText(OpenPgpUtils.s);
// mSignatureStatusImage.setImageResource(R.drawable.overlay_ok); mResultSignatureEmail.setText(signatureResult.getUserId());
mResultSignatureLayout.setVisibility(View.VISIBLE); mResultSignatureLayout.setVisibility(View.VISIBLE);
break; break;

View File

@ -20,8 +20,8 @@
<!-- sidebar --> <!-- sidebar -->
<View <View
android:id="@+id/message_sidebar" android:id="@+id/message_sidebar"
android:layout_width="8dp" android:layout_width="4dp"
android:layout_marginLeft="10dp" android:layout_marginLeft="12dp"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/openpgp_sidebar" android:background="@color/openpgp_sidebar"

View File

@ -63,8 +63,8 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<View <View
android:layout_width="8dp" android:layout_width="4dp"
android:layout_marginLeft="6dp" android:layout_marginLeft="8dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/openpgp_sidebar" /> android:background="@color/openpgp_sidebar" />
@ -78,7 +78,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:layout_marginLeft="16dp" android:layout_marginLeft="14dp"
android:paddingRight="4dp" android:paddingRight="4dp"
android:orientation="horizontal"> android:orientation="horizontal">
@ -107,16 +107,8 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="1dip"
android:layout_height="match_parent"
android:gravity="right"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/listDivider" />
<Button <Button
android:id="@+id/result_signature_action" android:id="@+id/result_signature_button"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -130,8 +122,8 @@
<View <View
android:id="@+id/result_signature_divider2" android:id="@+id/result_signature_divider2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dip" android:layout_height="2dp"
android:background="?android:attr/listDivider" /> android:background="@color/openpgp_sidebar" />
</LinearLayout> </LinearLayout>