Use type of compose action as action bar title

I.e. one of "Compose", "Reply", "Reply all", "Forward"
This commit is contained in:
cketti 2012-11-21 01:42:19 +01:00
parent e85bca648c
commit 349b1e997e
25 changed files with 144 additions and 49 deletions

View File

@ -88,7 +88,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g></string>
<string name="compose_title">Redacta</string>
<string name="compose_title_compose">Redacta</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Tria carpeta</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -94,7 +94,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Nová</string>
<string name="compose_title_compose">Nová</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Výběr složky</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Skriv</string>
<string name="compose_title_compose">Skriv</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Vælg en mappe</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -88,7 +88,11 @@ http://k9mail.googlecode.com/.
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Verfassen</string>
<string name="compose_title_compose">Verfassen</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Ordner wählen</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Σύνθεση</string>
<string name="compose_title_compose">Σύνθεση</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Επιλογή φακέλου</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Redactar</string>
<string name="compose_title_compose">Redactar</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Seleccionar carpeta</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -92,6 +92,10 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g></string>
<string name="compose_title">Kirjoita</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Valitse kansio</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -111,7 +111,11 @@ http://k9mail.googlecode.com/ (en anglais)
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g></string>
<string name="compose_title">Composer</string>
<string name="compose_title_compose">Composer</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Choisir un dossier</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Redactar</string>
<string name="compose_title_compose">Redactar</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Seleccionar carpeta</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Levélírás</string>
<string name="compose_title_compose">Levélírás</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Válasszon mappát</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Componi</string>
<string name="compose_title_compose">Componi</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Scegli la cartella</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">חבר</string>
<string name="compose_title_compose">חבר</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">בחר תיקייה</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ K-9 Mail セットアップにようこそ。\nK-9 は標準のAndroidメール
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">作成</string>
<string name="compose_title_compose">作成</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">フォルダ選択</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -88,7 +88,11 @@ K-9 메일 설치를 환영합니다. K-9은 표준 안드로이드 메일 클
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">작성</string>
<string name="compose_title_compose">작성</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">폴더 선택</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Ontwerp</string>
<string name="compose_title_compose">Ontwerp</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Kies een map</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -102,7 +102,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Nie</string>
<string name="compose_title_compose">Nie</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Wybierz folder</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Escrever</string>
<string name="compose_title_compose">Escrever</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Escolher pasta</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Написать новое письмо</string>
<string name="compose_title_compose">Написать новое письмо</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Выберите папку</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Skriv</string>
<string name="compose_title_compose">Skriv</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Välj en mapp</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/ adresine gönderin.
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Oluştur</string>
<string name="compose_title_compose">Oluştur</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Klasör Seç</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -89,7 +89,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Написати новий лист</string>
<string name="compose_title_compose">Написати новий лист</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">Вибрати папку</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -88,7 +88,11 @@
<string name="message_list_title"><xliff:g id="account">%s</xliff:g><xliff:g id="folder">%s</xliff:g></string>
<string name="compose_title">新邮件</string>
<string name="compose_title_compose">新邮件</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">选择文件夹</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -87,7 +87,11 @@
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">新郵件</string>
<string name="compose_title_compose">新郵件</string>
<!-- NEW: <string name="compose_title_reply">Reply</string>-->
<!-- NEW: <string name="compose_title_reply_all">Reply all</string>-->
<!-- NEW: <string name="compose_title_forward">Forward</string>-->
<string name="choose_folder_title">選擇信件匣</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -91,7 +91,11 @@ http://k9mail.googlecode.com/
<string name="message_list_title"><xliff:g id="account">%s</xliff:g>:<xliff:g id="folder">%s</xliff:g> </string>
<string name="compose_title">Compose</string>
<string name="compose_title_compose">Compose</string>
<string name="compose_title_reply">Reply</string>
<string name="compose_title_reply_all">Reply all</string>
<string name="compose_title_forward">Forward</string>
<string name="choose_folder_title">Choose Folder</string>
<string name="activity_header_format"><xliff:g id="activity_prefix">%s</xliff:g><xliff:g id="unread_count">%s</xliff:g><xliff:g id="operation">%s</xliff:g></string>

View File

@ -30,7 +30,6 @@ import com.actionbarsherlock.view.Window;
import android.view.ContextThemeWrapper;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@ -103,7 +102,7 @@ import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class MessageCompose extends K9Activity implements OnClickListener, OnFocusChangeListener {
public class MessageCompose extends K9Activity implements OnClickListener {
private static final int DIALOG_SAVE_OR_DISCARD_DRAFT_MESSAGE = 1;
private static final int DIALOG_REFUSE_TO_SAVE_DRAFT_MARKED_ENCRYPTED = 2;
private static final int DIALOG_CONTINUE_WITHOUT_PUBLIC_KEY = 3;
@ -150,10 +149,9 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
private static final int MSG_PROGRESS_ON = 1;
private static final int MSG_PROGRESS_OFF = 2;
private static final int MSG_UPDATE_TITLE = 3;
private static final int MSG_SKIPPED_ATTACHMENTS = 4;
private static final int MSG_SAVED_DRAFT = 5;
private static final int MSG_DISCARDED_DRAFT = 6;
private static final int MSG_SKIPPED_ATTACHMENTS = 3;
private static final int MSG_SAVED_DRAFT = 4;
private static final int MSG_DISCARDED_DRAFT = 5;
private static final int ACTIVITY_REQUEST_PICK_ATTACHMENT = 1;
private static final int CONTACT_PICKER_TO = 4;
@ -334,9 +332,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
case MSG_PROGRESS_OFF:
setSupportProgressBarIndeterminateVisibility(false);
break;
case MSG_UPDATE_TITLE:
updateTitle();
break;
case MSG_SKIPPED_ATTACHMENTS:
Toast.makeText(
MessageCompose.this,
@ -665,9 +660,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mBccView.setTokenizer(new Rfc822Tokenizer());
mBccView.setValidator(mAddressValidator);
mSubjectView.setOnFocusChangeListener(this);
if (savedInstanceState != null) {
/*
* This data gets used in onCreate, so grab it here instead of onRestoreInstanceState
@ -741,8 +733,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
if (mAction != Action.EDIT_DRAFT) {
addAddresses(mBccView, mAccount.getAlwaysBcc());
}
updateTitle();
}
if (mAction == Action.REPLY || mAction == Action.REPLY_ALL) {
@ -830,6 +820,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mSignatureView.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSize);
updateMessageFormat();
setTitle();
}
/**
@ -1116,18 +1108,25 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
updateMessageFormat();
}
private void updateTitle() {
if (mSubjectView.getText().length() == 0) {
setTitle(R.string.compose_title);
} else {
setTitle(mSubjectView.getText().toString());
}
}
@Override
public void onFocusChange(View view, boolean focused) {
if (!focused) {
updateTitle();
private void setTitle() {
switch (mAction) {
case REPLY: {
setTitle(R.string.compose_title_reply);
break;
}
case REPLY_ALL: {
setTitle(R.string.compose_title_reply_all);
break;
}
case FORWARD: {
setTitle(R.string.compose_title_forward);
break;
}
case COMPOSE:
default: {
setTitle(R.string.compose_title_compose);
break;
}
}
}