mirror of
https://github.com/thunderbird/thunderbird-android.git
synced 2024-09-19 19:52:14 +02:00
compose: layout overhaul, opan gmail style
This commit is contained in:
parent
367532c9e3
commit
5d00303677
@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="14"
|
||||
height="14"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="ic_notify_new_mail.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:path-effect
|
||||
effect="powerstroke"
|
||||
id="path-effect4146"
|
||||
is_visible="true"
|
||||
offset_points="0,0.5"
|
||||
sort_points="true"
|
||||
interpolator_type="Linear"
|
||||
interpolator_beta="0.2"
|
||||
start_linecap_type="zerowidth"
|
||||
linejoin_type="round"
|
||||
miter_limit="4"
|
||||
end_linecap_type="zerowidth"
|
||||
cusp_linecap_type="round" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.627417"
|
||||
inkscape:cx="3.9495951"
|
||||
inkscape:cy="6.0846079"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g3796"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="784"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="16"
|
||||
inkscape:window-maximized="0"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-4.9180818,-1029.8885)">
|
||||
<g
|
||||
id="g3796">
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 18.918082,1043.8885 0,-6 -8,-8 -6.0000002,0 z"
|
||||
id="path4148"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.4 KiB |
@ -48,6 +48,7 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View.OnFocusChangeListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.webkit.WebView;
|
||||
@ -78,7 +79,7 @@ import com.fsck.k9.controller.MessagingController;
|
||||
import com.fsck.k9.controller.MessagingListener;
|
||||
import com.fsck.k9.crypto.PgpData;
|
||||
import com.fsck.k9.fragment.ProgressDialogFragment;
|
||||
import com.fsck.k9.helper.ContactItem;
|
||||
import com.fsck.k9.fragment.ProgressDialogFragment.CancelListener;
|
||||
import com.fsck.k9.helper.Contacts;
|
||||
import com.fsck.k9.helper.HtmlConverter;
|
||||
import com.fsck.k9.helper.IdentityHelper;
|
||||
@ -114,7 +115,7 @@ import org.openintents.openpgp.util.OpenPgpApi;
|
||||
import org.openintents.openpgp.util.OpenPgpServiceConnection;
|
||||
|
||||
public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
ProgressDialogFragment.CancelListener {
|
||||
CancelListener, OnFocusChangeListener {
|
||||
|
||||
private static final int DIALOG_SAVE_OR_DISCARD_DRAFT_MESSAGE = 1;
|
||||
private static final int DIALOG_REFUSE_TO_SAVE_DRAFT_MARKED_ENCRYPTED = 2;
|
||||
@ -232,6 +233,18 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
|
||||
private RecipientPresenter recipientPresenter;
|
||||
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
switch(v.getId()) {
|
||||
case R.id.message_content:
|
||||
case R.id.subject:
|
||||
if (hasFocus) {
|
||||
recipientPresenter.onNonRecipientFieldFocused();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
enum Action {
|
||||
COMPOSE,
|
||||
REPLY,
|
||||
@ -260,7 +273,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
*/
|
||||
private boolean mForcePlainText = false;
|
||||
|
||||
private Button mChooseIdentityButton;
|
||||
private TextView mChooseIdentityButton;
|
||||
private EditText mSubjectView;
|
||||
private EolConvertingEditText mSignatureView;
|
||||
private EolConvertingEditText mMessageContentView;
|
||||
@ -529,13 +542,15 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
|
||||
mContacts = Contacts.getInstance(MessageCompose.this);
|
||||
|
||||
mChooseIdentityButton = (Button) findViewById(R.id.identity);
|
||||
mChooseIdentityButton = (TextView) findViewById(R.id.identity);
|
||||
mChooseIdentityButton.setOnClickListener(this);
|
||||
|
||||
/*
|
||||
if (mAccount.getIdentities().size() == 1 &&
|
||||
Preferences.getPreferences(this).getAvailableAccounts().size() == 1) {
|
||||
mChooseIdentityButton.setVisibility(View.GONE);
|
||||
}
|
||||
*/
|
||||
|
||||
RecipientView recipientView = new RecipientView(this);
|
||||
recipientPresenter = new RecipientPresenter(this, recipientView, mAccount);
|
||||
@ -597,6 +612,9 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
|
||||
showOrHideQuotedText(QuotedTextMode.NONE);
|
||||
|
||||
mSubjectView.setOnFocusChangeListener(this);
|
||||
mMessageContentView.setOnFocusChangeListener(this);
|
||||
|
||||
mQuotedTextShow.setOnClickListener(this);
|
||||
mQuotedTextEdit.setOnClickListener(this);
|
||||
mQuotedTextDelete.setOnClickListener(this);
|
||||
@ -743,6 +761,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
} else {
|
||||
mEncryptLayout.setVisibility(View.GONE);
|
||||
}
|
||||
mEncryptLayout.setVisibility(View.GONE);
|
||||
|
||||
// Set font size of input controls
|
||||
int fontSize = mFontSizes.getMessageComposeInput();
|
||||
@ -1772,14 +1791,12 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
case R.id.add_from_contacts:
|
||||
recipientPresenter.onMenuAddFromContacts();
|
||||
break;
|
||||
case R.id.add_cc_bcc:
|
||||
recipientPresenter.onMenuShowCcBcc();
|
||||
break;
|
||||
case R.id.add_attachment:
|
||||
onAddAttachment();
|
||||
break;
|
||||
case R.id.read_receipt:
|
||||
onReadReceipt();
|
||||
break;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class RecipientPresenter {
|
||||
public void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
recipientView.setCcVisibility(savedInstanceState.getBoolean(STATE_KEY_CC_SHOWN));
|
||||
recipientView.setBccVisibility(savedInstanceState.getBoolean(STATE_KEY_BCC_SHOWN));
|
||||
recipientView.invalidateOptionsMenu();
|
||||
updateRecipientExpanderVisibility();
|
||||
}
|
||||
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
@ -206,7 +206,7 @@ public class RecipientPresenter {
|
||||
if (ccAddresses.length > 0) {
|
||||
addRecipientsFromAddresses(RecipientType.CC, ccAddresses);
|
||||
recipientView.setCcVisibility(true);
|
||||
recipientView.invalidateOptionsMenu();
|
||||
updateRecipientExpanderVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,16 +220,11 @@ public class RecipientPresenter {
|
||||
boolean singleBccRecipientFromAccount =
|
||||
bccRecipients.length == 1 && bccRecipients[0].toString().equals(bccAddress);
|
||||
recipientView.setBccVisibility(alreadyVisible || singleBccRecipientFromAccount);
|
||||
recipientView.invalidateOptionsMenu();
|
||||
updateRecipientExpanderVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
public void onPrepareOptionsMenu(Menu menu) {
|
||||
boolean ccAndBccAlreadyShown = recipientView.isCcVisible() && recipientView.isBccVisible();
|
||||
if (ccAndBccAlreadyShown) {
|
||||
menu.findItem(R.id.add_cc_bcc).setVisible(false);
|
||||
}
|
||||
|
||||
boolean noContactPickerAvailable = !recipientView.hasContactPicker();
|
||||
if (noContactPickerAvailable) {
|
||||
menu.findItem(R.id.add_from_contacts).setVisible(false);
|
||||
@ -241,7 +236,7 @@ public class RecipientPresenter {
|
||||
if (account.isAlwaysShowCcBcc()) {
|
||||
recipientView.setCcVisibility(true);
|
||||
recipientView.setBccVisibility(true);
|
||||
recipientView.invalidateOptionsMenu();
|
||||
updateRecipientExpanderVisibility();
|
||||
}
|
||||
cryptoProvider = account.getOpenPgpProvider();
|
||||
recipientView.setCryptoProvider(cryptoProvider);
|
||||
@ -275,10 +270,31 @@ public class RecipientPresenter {
|
||||
return result.toArray(new Address[result.size()]);
|
||||
}
|
||||
|
||||
public void onMenuShowCcBcc() {
|
||||
public void onClickRecipientExpander() {
|
||||
recipientView.setCcVisibility(true);
|
||||
recipientView.setBccVisibility(true);
|
||||
recipientView.invalidateOptionsMenu();
|
||||
updateRecipientExpanderVisibility();
|
||||
}
|
||||
|
||||
private void hideEmptyExtendedRecipientFields() {
|
||||
if (recipientView.getCcAddresses().isEmpty()) {
|
||||
recipientView.setCcVisibility(false);
|
||||
if (lastFocusedType == RecipientType.CC) {
|
||||
lastFocusedType = RecipientType.TO;
|
||||
}
|
||||
}
|
||||
if (recipientView.getBccAddresses().isEmpty()) {
|
||||
recipientView.setBccVisibility(false);
|
||||
if (lastFocusedType == RecipientType.BCC) {
|
||||
lastFocusedType = RecipientType.TO;
|
||||
}
|
||||
}
|
||||
updateRecipientExpanderVisibility();
|
||||
}
|
||||
|
||||
private void updateRecipientExpanderVisibility() {
|
||||
boolean notBothAreVisible = !(recipientView.isCcVisible() && recipientView.isBccVisible());
|
||||
recipientView.setRecipientExpanderVisibility(notBothAreVisible);
|
||||
}
|
||||
|
||||
public void updateCryptoStatus() {
|
||||
@ -411,4 +427,7 @@ public class RecipientPresenter {
|
||||
|
||||
}
|
||||
|
||||
public void onNonRecipientFieldFocused() {
|
||||
hideEmptyExtendedRecipientFields();
|
||||
}
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View.OnFocusChangeListener;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ViewAnimator;
|
||||
|
||||
@ -21,16 +21,17 @@ import com.fsck.k9.mail.Message.RecipientType;
|
||||
import com.tokenautocomplete.TokenCompleteTextView.TokenListener;
|
||||
|
||||
|
||||
public class RecipientView {
|
||||
public class RecipientView implements OnFocusChangeListener, OnClickListener {
|
||||
|
||||
private final MessageCompose activity;
|
||||
|
||||
private final LinearLayout ccWrapper;
|
||||
private final LinearLayout bccWrapper;
|
||||
private final View ccWrapper, ccDivider;
|
||||
private final View bccWrapper, bccDivider;
|
||||
private final RecipientSelectView toView;
|
||||
private final RecipientSelectView ccView;
|
||||
private final RecipientSelectView bccView;
|
||||
private final ViewAnimator cryptoStatus;
|
||||
private final ViewAnimator recipientExpanderContainer;
|
||||
|
||||
private RecipientPresenter presenter;
|
||||
|
||||
@ -40,9 +41,19 @@ public class RecipientView {
|
||||
toView = (RecipientSelectView) activity.findViewById(R.id.to);
|
||||
ccView = (RecipientSelectView) activity.findViewById(R.id.cc);
|
||||
bccView = (RecipientSelectView) activity.findViewById(R.id.bcc);
|
||||
ccWrapper = (LinearLayout) activity.findViewById(R.id.cc_wrapper);
|
||||
bccWrapper = (LinearLayout) activity.findViewById(R.id.bcc_wrapper);
|
||||
ccWrapper = activity.findViewById(R.id.cc_wrapper);
|
||||
ccDivider = activity.findViewById(R.id.cc_divider);
|
||||
bccWrapper = activity.findViewById(R.id.bcc_wrapper);
|
||||
bccDivider = activity.findViewById(R.id.bcc_divider);
|
||||
recipientExpanderContainer = (ViewAnimator) activity.findViewById(R.id.recipient_expander_container);
|
||||
cryptoStatus = (ViewAnimator) activity.findViewById(R.id.crypto_status);
|
||||
|
||||
toView.setOnFocusChangeListener(this);
|
||||
ccView.setOnFocusChangeListener(this);
|
||||
bccView.setOnFocusChangeListener(this);
|
||||
|
||||
View recipientExpander = activity.findViewById(R.id.recipient_expander);
|
||||
recipientExpander.setOnClickListener(this);
|
||||
}
|
||||
|
||||
public void setPresenter(final RecipientPresenter presenter) {
|
||||
@ -52,9 +63,6 @@ public class RecipientView {
|
||||
toView.setTokenListener(null);
|
||||
ccView.setTokenListener(null);
|
||||
bccView.setTokenListener(null);
|
||||
toView.setOnFocusChangeListener(null);
|
||||
ccView.setOnFocusChangeListener(null);
|
||||
bccView.setOnFocusChangeListener(null);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -94,34 +102,6 @@ public class RecipientView {
|
||||
presenter.onBccTokenRemoved(recipient);
|
||||
}
|
||||
});
|
||||
|
||||
toView.setOnFocusChangeListener(new OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
presenter.onToFocused();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ccView.setOnFocusChangeListener(new OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
presenter.onCcFocused();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
bccView.setOnFocusChangeListener(new OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (hasFocus) {
|
||||
presenter.onBccFocused();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void addTextChangedListener(TextWatcher textWatcher) {
|
||||
@ -162,10 +142,19 @@ public class RecipientView {
|
||||
|
||||
public void setCcVisibility(boolean visible) {
|
||||
ccWrapper.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
ccDivider.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void setBccVisibility(boolean visible) {
|
||||
bccWrapper.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
bccDivider.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void setRecipientExpanderVisibility(boolean visible) {
|
||||
int childToDisplay = visible ? 0 : 1;
|
||||
if (recipientExpanderContainer.getDisplayedChild() != childToDisplay) {
|
||||
recipientExpanderContainer.setDisplayedChild(childToDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCcVisible() {
|
||||
@ -180,10 +169,6 @@ public class RecipientView {
|
||||
toView.setError(toView.getContext().getString(R.string.message_compose_error_no_recipients));
|
||||
}
|
||||
|
||||
public void invalidateOptionsMenu() {
|
||||
activity.invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
public List<Address> getToAddresses() {
|
||||
return Arrays.asList(toView.getAddresses());
|
||||
}
|
||||
@ -263,4 +248,30 @@ public class RecipientView {
|
||||
Toast.makeText(activity, activity.getString(R.string.error_contact_address_not_found), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (!hasFocus) {
|
||||
return;
|
||||
}
|
||||
switch(v.getId()) {
|
||||
case R.id.to:
|
||||
presenter.onToFocused();
|
||||
break;
|
||||
case R.id.cc:
|
||||
presenter.onCcFocused();
|
||||
break;
|
||||
case R.id.bcc:
|
||||
presenter.onBccFocused();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch(v.getId()) {
|
||||
case R.id.recipient_expander:
|
||||
presenter.onClickRecipientExpander();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 207 B |
Binary file not shown.
Before Width: | Height: | Size: 239 B |
Binary file not shown.
Before Width: | Height: | Size: 252 B |
@ -21,46 +21,46 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:paddingTop="6dp"
|
||||
android:orientation="vertical"
|
||||
android:background="#45bcbcbc">
|
||||
|
||||
<Button
|
||||
android:id="@+id/identity"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"/>
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/to_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="true"
|
||||
android:gravity="bottom"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_width="fill_parent">
|
||||
android:layout_marginLeft="12dip"
|
||||
android:layout_marginRight="12dip"
|
||||
android:minHeight="50dp">
|
||||
|
||||
<com.fsck.k9.activity.RecipientSelectView
|
||||
android:id="@+id/to"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:hint="@string/message_compose_to_hint"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:paddingRight="38dp"
|
||||
android:paddingEnd="38dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/from_label"
|
||||
android:minWidth="50dp"
|
||||
android:text="From"
|
||||
style="@style/ComposeTextLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/identity"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/from_label"
|
||||
android:layout_toEndOf="@id/from_label"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:singleLine="true"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
tools:text="Address"
|
||||
style="@style/ComposeEditText"
|
||||
/>
|
||||
|
||||
<ViewAnimator
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/crypto_status"
|
||||
android:visibility="gone"
|
||||
android:inAnimation="@anim/fade_in"
|
||||
@ -70,6 +70,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/status_lock_open"
|
||||
android:tint="@color/openpgp_red"
|
||||
/>
|
||||
@ -77,6 +78,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/status_lock_error"
|
||||
android:tint="@color/openpgp_orange"
|
||||
/>
|
||||
@ -84,6 +86,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/status_lock_closed"
|
||||
android:tint="@color/openpgp_green"
|
||||
/>
|
||||
@ -92,52 +95,167 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/to_wrapper"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:minHeight="50dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/to_label"
|
||||
android:labelFor="@+id/to"
|
||||
android:minWidth="50dp"
|
||||
android:text="To"
|
||||
style="@style/ComposeTextLabel" />
|
||||
|
||||
<com.fsck.k9.activity.RecipientSelectView
|
||||
android:id="@+id/to"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/to_label"
|
||||
android:layout_toEndOf="@id/to_label"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:dropDownWidth="wrap_content"
|
||||
android:dropDownAnchor="@id/to_wrapper"
|
||||
tools:text="Recipient"
|
||||
style="@style/ComposeEditText"
|
||||
/>
|
||||
|
||||
<ViewAnimator
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/recipient_expander_container"
|
||||
android:inAnimation="@anim/fade_in"
|
||||
android:outAnimation="@anim/fade_out"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_action_expand_light"
|
||||
android:id="@+id/recipient_expander"
|
||||
/>
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</ViewAnimator>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cc_wrapper"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="true"
|
||||
android:gravity="bottom"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_width="fill_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:layout_marginRight="12dip"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:minHeight="50dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:labelFor="@+id/cc"
|
||||
android:text="Cc"
|
||||
style="@style/ComposeTextLabel" />
|
||||
|
||||
<com.fsck.k9.activity.RecipientSelectView
|
||||
android:id="@+id/cc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_width="match_parent"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:hint="@string/message_compose_cc_hint"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:dropDownWidth="wrap_content"
|
||||
android:dropDownAnchor="@id/cc_wrapper"
|
||||
style="@style/ComposeEditText"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/cc_divider"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bcc_wrapper"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="true"
|
||||
android:gravity="bottom"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_width="fill_parent">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:layout_marginRight="12dip"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:minHeight="50dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:labelFor="@+id/bcc"
|
||||
android:text="Bcc"
|
||||
style="@style/ComposeTextLabel" />
|
||||
|
||||
<com.fsck.k9.activity.RecipientSelectView
|
||||
android:id="@+id/bcc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:inputType="textEmailAddress|textMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:hint="@string/message_compose_bcc_hint"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:dropDownWidth="wrap_content"
|
||||
android:dropDownAnchor="@id/bcc_wrapper"
|
||||
style="@style/ComposeEditText"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/bcc_divider"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_encrypt"
|
||||
android:orientation="horizontal"
|
||||
@ -196,17 +314,35 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="fill_parent"
|
||||
<LinearLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="6dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:hint="@string/message_compose_subject_hint"
|
||||
android:inputType="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginLeft="12dip"
|
||||
android:layout_marginRight="12dip"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:minHeight="50dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/message_compose_subject_hint"
|
||||
android:inputType="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine"
|
||||
android:imeOptions="actionNext"
|
||||
android:singleLine="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
style="@style/ComposeEditTextLarge"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<!--
|
||||
Empty container for storing attachments. We'll stick
|
||||
@ -218,10 +354,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<!--
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="@drawable/divider_horizontal_email" />
|
||||
-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -238,7 +376,8 @@
|
||||
android:inputType="textMultiLine|textAutoCorrect|textCapSentences"
|
||||
android:imeOptions="actionDone|flagNoEnterAction"
|
||||
android:minLines="3"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
style="@style/ComposeEditTextLarge"
|
||||
/>
|
||||
|
||||
<view
|
||||
class="com.fsck.k9.ui.EolConvertingEditText"
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:background="#ccc">
|
||||
|
||||
<ImageView
|
||||
@ -18,29 +18,32 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@android:id/text1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="4dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
tools:text="Name"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="-5dp"
|
||||
android:src="@drawable/ic_corner_stripe_tr"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/contact_crypto_status_red"
|
||||
android:src="@drawable/status_lock_open"
|
||||
android:tint="@color/openpgp_red"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/contact_crypto_status_red"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="-5dp"
|
||||
android:src="@drawable/ic_corner_stripe_tr"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/contact_crypto_status_orange"
|
||||
android:src="@drawable/status_lock_error"
|
||||
android:tint="@color/openpgp_orange"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/contact_crypto_status_orange"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@ -1,12 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/add_cc_bcc"
|
||||
android:alphabeticShortcut="c"
|
||||
android:title="@string/add_cc_bcc_action"
|
||||
android:icon="?attr/iconActionAddCcBcc"
|
||||
android:showAsAction="always"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/add_attachment"
|
||||
android:alphabeticShortcut="n"
|
||||
|
@ -39,5 +39,17 @@
|
||||
<item name="android:shadowRadius">4.0</item>
|
||||
</style>
|
||||
|
||||
<style name="ComposeTextLabel" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textColor">#aaa</item>
|
||||
</style>
|
||||
<style name="ComposeEditText" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:textColorHint">#aaa</item>
|
||||
</style>
|
||||
<style name="ComposeEditTextLarge" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColorHint">#aaa</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user