1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-17 21:32:26 -05:00

Code cleanup

This commit is contained in:
cketti 2015-02-17 01:54:40 +01:00
parent 6b52f41e2c
commit c64ae008c1
2 changed files with 4 additions and 6 deletions

View File

@ -61,7 +61,6 @@ public class MessageContainerView extends LinearLayout implements OnClickListene
private static final int MENU_ITEM_EMAIL_SAVE = Menu.FIRST + 1; private static final int MENU_ITEM_EMAIL_SAVE = Menu.FIRST + 1;
private static final int MENU_ITEM_EMAIL_COPY = Menu.FIRST + 2; private static final int MENU_ITEM_EMAIL_COPY = Menu.FIRST + 2;
private ViewStub mOpenPgpHeaderStub;
private View mSidebar; private View mSidebar;
private MessageWebView mMessageContentView; private MessageWebView mMessageContentView;
private LinearLayout mAttachments; private LinearLayout mAttachments;
@ -72,7 +71,6 @@ public class MessageContainerView extends LinearLayout implements OnClickListene
private View mShowAttachmentsAction; private View mShowAttachmentsAction;
private boolean mShowPictures; private boolean mShowPictures;
private boolean mHasAttachments; private boolean mHasAttachments;
private boolean mHasOpenPgpInfo;
private LayoutInflater mInflater; private LayoutInflater mInflater;
private Contacts mContacts; private Contacts mContacts;
private AttachmentViewCallback attachmentCallback; private AttachmentViewCallback attachmentCallback;
@ -94,7 +92,6 @@ public class MessageContainerView extends LinearLayout implements OnClickListene
this.openPgpHeaderViewCallback = openPgpHeaderViewCallback; this.openPgpHeaderViewCallback = openPgpHeaderViewCallback;
this.displayPgpHeader = displayPgpHeader; this.displayPgpHeader = displayPgpHeader;
mOpenPgpHeaderStub = (ViewStub) findViewById(R.id.openpgp_header_stub);
mSidebar = findViewById(R.id.message_sidebar); mSidebar = findViewById(R.id.message_sidebar);
mMessageContentView = (MessageWebView) findViewById(R.id.message_content); mMessageContentView = (MessageWebView) findViewById(R.id.message_content);
@ -120,8 +117,8 @@ public class MessageContainerView extends LinearLayout implements OnClickListene
mMessageContentView.setVisibility(View.VISIBLE); mMessageContentView.setVisibility(View.VISIBLE);
if (displayPgpHeader) { if (displayPgpHeader) {
openPgpHeaderView = (OpenPgpHeaderView) mOpenPgpHeaderStub.inflate(); ViewStub openPgpHeaderStub = (ViewStub) findViewById(R.id.openpgp_header_stub);
openPgpHeaderView.initialize(); openPgpHeaderView = (OpenPgpHeaderView) openPgpHeaderStub.inflate();
} }
// the HTC version of WebView tries to force the background of the // the HTC version of WebView tries to force the background of the

View File

@ -38,7 +38,8 @@ public class OpenPgpHeaderView extends LinearLayout {
mContext = context; mContext = context;
} }
public void initialize () { @Override
public void onFinishInflate() {
mResultEncryptionIcon = (ImageView) findViewById(R.id.result_encryption_icon); mResultEncryptionIcon = (ImageView) findViewById(R.id.result_encryption_icon);
mResultEncryptionText = (TextView) findViewById(R.id.result_encryption_text); mResultEncryptionText = (TextView) findViewById(R.id.result_encryption_text);
mResultSignatureIcon = (ImageView) findViewById(R.id.result_signature_icon); mResultSignatureIcon = (ImageView) findViewById(R.id.result_signature_icon);