mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Merge pull request #252 from m0vie/fixes
hdpi drawable / header cleanup / subject fixes
This commit is contained in:
commit
3074f25df3
BIN
res/drawable-hdpi/attachment_text_box_dark.9.png
Normal file
BIN
res/drawable-hdpi/attachment_text_box_dark.9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@android:drawable/menuitem_background"
|
||||
android:state_pressed="true" />
|
||||
|
||||
<item android:drawable="@android:drawable/menuitem_background"
|
||||
android:state_focused="true"
|
||||
android:state_enabled="true"
|
||||
android:state_window_focused="true" />
|
||||
|
||||
<item android:drawable="@color/message_view_header_background" />
|
||||
|
||||
</selector>
|
@ -63,9 +63,7 @@
|
||||
android:id="@+id/message_title_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="2"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -63,9 +63,7 @@
|
||||
android:id="@+id/message_title_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="2"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<com.fsck.k9.view.MessageTitleView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textSize="16sp"
|
||||
android:includeFontPadding="false"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@ -897,8 +897,7 @@ Si us plau, envia’ns els errors, contribueix a millorar-lo a
|
||||
<string name="font_size_message_view_cc">A/c</string>
|
||||
<string name="font_size_message_view_additional_headers">Capçaleres addicionals</string>
|
||||
<string name="font_size_message_view_subject">Assumpte</string>
|
||||
<string name="font_size_message_view_time">Hora</string>
|
||||
<string name="font_size_message_view_date">Data</string>
|
||||
<string name="font_size_message_view_date">Hora i Data</string>
|
||||
<string name="font_size_message_view_content">Cos del missatge</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -902,8 +902,7 @@ Posílejte prosím chybová hlášení, přispívejte novými funkcemi a ptejte
|
||||
<string name="font_size_message_view_cc">Příjemce zprávy (Kopie)</string>
|
||||
<string name="font_size_message_view_additional_headers">Další záhlaví</string>
|
||||
<string name="font_size_message_view_subject">Předmět zprávy</string>
|
||||
<string name="font_size_message_view_time">Čas zprávy</string>
|
||||
<string name="font_size_message_view_date">Datum zprávy</string>
|
||||
<string name="font_size_message_view_date">Datum a čas zprávy</string>
|
||||
<string name="font_size_message_view_content">Tělo zprávy</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -896,8 +896,7 @@ Vær venlig at sende fejlrapporter, anmodning om nye funktioner, og spørgsmål
|
||||
<string name="font_size_message_view_cc">Modtagere (Cc)</string>
|
||||
<string name="font_size_message_view_additional_headers">Yderligere headers</string>
|
||||
<string name="font_size_message_view_subject">Emne</string>
|
||||
<string name="font_size_message_view_time">Tid</string>
|
||||
<string name="font_size_message_view_date">Dato</string>
|
||||
<string name="font_size_message_view_date">Tid og dato</string>
|
||||
<string name="font_size_message_view_content">Indhold</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -927,8 +927,7 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
|
||||
<string name="font_size_message_view_cc">Empfänger (CC)</string>
|
||||
<string name="font_size_message_view_additional_headers">Zusätzliche Header</string>
|
||||
<string name="font_size_message_view_subject">Betreff</string>
|
||||
<string name="font_size_message_view_time">Zeit</string>
|
||||
<string name="font_size_message_view_date">Datum</string>
|
||||
<string name="font_size_message_view_date">Uhrzeit und Datum</string>
|
||||
<string name="font_size_message_view_content">Nachrichtentext</string>
|
||||
|
||||
<string name="font_size_message_compose">Nachricht verfassen</string>
|
||||
|
@ -893,8 +893,7 @@
|
||||
<string name="font_size_message_view_cc">Κοινοποίηση</string>
|
||||
<string name="font_size_message_view_additional_headers">Επιπλέον επικεφαλίδες</string>
|
||||
<string name="font_size_message_view_subject">Θέμα</string>
|
||||
<string name="font_size_message_view_time">Ώρα</string>
|
||||
<string name="font_size_message_view_date">Ημερομηνία</string>
|
||||
<string name="font_size_message_view_date">Ώρα και Ημερομηνία</string>
|
||||
<string name="font_size_message_view_content">Σώμα μηνύματος</string>
|
||||
|
||||
<string name="font_size_message_compose">Σύνθεση μηνύματος</string>
|
||||
|
@ -894,8 +894,7 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
|
||||
<string name="font_size_message_view_cc">Cc</string>
|
||||
<string name="font_size_message_view_additional_headers">Encabezados adicionales</string>
|
||||
<string name="font_size_message_view_subject">Asunto</string>
|
||||
<string name="font_size_message_view_time">Hora</string>
|
||||
<string name="font_size_message_view_date">Fecha</string>
|
||||
<string name="font_size_message_view_date">Hora y Fecha</string>
|
||||
<string name="font_size_message_view_content">Cuerpo de mensaje</string>
|
||||
|
||||
<string name="font_size_message_compose">Composición mensaje</string>
|
||||
|
@ -925,8 +925,7 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
|
||||
<string name="font_size_message_view_cc">Kopio</string>
|
||||
<string name="font_size_message_view_additional_headers">Tarkemmat otsikkotiedot</string>
|
||||
<string name="font_size_message_view_subject">Viestin aihe</string>
|
||||
<string name="font_size_message_view_time">Aika</string>
|
||||
<string name="font_size_message_view_date">Päiväys</string>
|
||||
<string name="font_size_message_view_date">Aika ja päivämäärä</string>
|
||||
<string name="font_size_message_view_content">Viestin sisältö</string>
|
||||
|
||||
<string name="font_size_message_compose">Viestin kirjoitus</string>
|
||||
|
@ -949,8 +949,7 @@ de plus</string>
|
||||
<string name="font_size_message_view_cc">Destinataire du message (CC)</string>
|
||||
<string name="font_size_message_view_additional_headers">Entêtes supplémentaires</string>
|
||||
<string name="font_size_message_view_subject">Sujet du message</string>
|
||||
<string name="font_size_message_view_time">Heure du message</string>
|
||||
<string name="font_size_message_view_date">Date du message</string>
|
||||
<string name="font_size_message_view_date">Heure et date du message</string>
|
||||
<string name="font_size_message_view_content">Contenu du message</string>
|
||||
|
||||
<string name="font_size_message_compose">Taille de police des message</string>
|
||||
|
@ -893,8 +893,7 @@ Por favor, envía os erros detectados, contribúe con novas funcionalidas e preg
|
||||
<string name="font_size_message_view_cc">Cc</string>
|
||||
<string name="font_size_message_view_additional_headers">Encabezados adicionáis</string>
|
||||
<string name="font_size_message_view_subject">Asunto</string>
|
||||
<string name="font_size_message_view_time">Hora</string>
|
||||
<string name="font_size_message_view_date">Data</string>
|
||||
<string name="font_size_message_view_date">Data e Hora</string>
|
||||
<string name="font_size_message_view_content">Corpo da mensaxe</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -893,8 +893,7 @@ Hibajelentéseivel hozzájárul az újabb verziók tökéletesítéséhez, kérd
|
||||
<string name="font_size_message_view_cc">Másolatot kap</string>
|
||||
<string name="font_size_message_view_additional_headers">További fejlécek</string>
|
||||
<string name="font_size_message_view_subject">Tárgy</string>
|
||||
<string name="font_size_message_view_time">Idő</string>
|
||||
<string name="font_size_message_view_date">Dátum</string>
|
||||
<string name="font_size_message_view_date">Idő és dátum</string>
|
||||
<string name="font_size_message_view_content">Üzenet szövege</string>
|
||||
|
||||
<string name="font_size_message_compose">Üzenet írása</string>
|
||||
|
@ -897,8 +897,7 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
|
||||
<string name="font_size_message_view_cc">Cc</string>
|
||||
<string name="font_size_message_view_additional_headers">Altre intestazioni</string>
|
||||
<string name="font_size_message_view_subject">Oggetto</string>
|
||||
<string name="font_size_message_view_time">Ora</string>
|
||||
<string name="font_size_message_view_date">Data</string>
|
||||
<string name="font_size_message_view_date">Ora e data</string>
|
||||
<string name="font_size_message_view_content">Corpo del messaggio</string>
|
||||
|
||||
<string name="font_size_message_compose">Composizione messaggio</string>
|
||||
|
@ -893,8 +893,7 @@
|
||||
<string name="font_size_message_view_cc">עותק</string>
|
||||
<string name="font_size_message_view_additional_headers">כותרות נוספות</string>
|
||||
<string name="font_size_message_view_subject">כותרת</string>
|
||||
<string name="font_size_message_view_time">זמן</string>
|
||||
<string name="font_size_message_view_date">תאריך</string>
|
||||
<string name="font_size_message_view_date">שעה ותאריך</string>
|
||||
<string name="font_size_message_view_content">גוף ההודעה</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -892,8 +892,7 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ
|
||||
<string name="font_size_message_view_cc">CC</string>
|
||||
<string name="font_size_message_view_additional_headers">追加ヘッダ</string>
|
||||
<string name="font_size_message_view_subject">件名</string>
|
||||
<string name="font_size_message_view_time">時刻</string>
|
||||
<string name="font_size_message_view_date">日付</string>
|
||||
<string name="font_size_message_view_date">日時</string>
|
||||
<string name="font_size_message_view_content">本文</string>
|
||||
|
||||
<string name="font_size_message_compose">メッセージ作成</string>
|
||||
|
@ -893,8 +893,7 @@ K-9 메일은 다른 메일 클라이언트와 마찬가지로 대부분의 무
|
||||
<string name="font_size_message_view_cc">참조</string>
|
||||
<string name="font_size_message_view_additional_headers">추가 헤더정보</string>
|
||||
<string name="font_size_message_view_subject">제목</string>
|
||||
<string name="font_size_message_view_time">시간</string>
|
||||
<string name="font_size_message_view_date">날짜</string>
|
||||
<string name="font_size_message_view_date">시간 및 날짜</string>
|
||||
<string name="font_size_message_view_content">내용</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -893,8 +893,7 @@ Graag foutrapporten, bijdrage nieuwe functies en vragen stellen op
|
||||
<string name="font_size_message_view_cc">Bericht ontvanger (CC)</string>
|
||||
<string name="font_size_message_view_additional_headers">Extra koppen</string>
|
||||
<string name="font_size_message_view_subject">Bericht onderwerp</string>
|
||||
<string name="font_size_message_view_time">Bericht tijd</string>
|
||||
<string name="font_size_message_view_date">Bericht datum</string>
|
||||
<string name="font_size_message_view_date">Bericht tijd en datum</string>
|
||||
<string name="font_size_message_view_content">Bericht inhoud</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -905,8 +905,7 @@ Wszelkie zgłoszenia usterek, zapytania oraz nowe pomysły prosimy przesyłać z
|
||||
<string name="font_size_message_view_cc">Odbiorca kopii (DW:)</string>
|
||||
<string name="font_size_message_view_additional_headers">Dodatkowe nagłówki</string>
|
||||
<string name="font_size_message_view_subject">Temat</string>
|
||||
<string name="font_size_message_view_time">Godzina</string>
|
||||
<string name="font_size_message_view_date">Data</string>
|
||||
<string name="font_size_message_view_date">Czas i data</string>
|
||||
<string name="font_size_message_view_content">Treść wiadomości</string>
|
||||
|
||||
<string name="font_size_message_compose">Kompozycja wiadomości</string>
|
||||
|
@ -889,8 +889,7 @@ K-9 Mail это программа электронной почты для Andr
|
||||
<string name="font_size_message_view_cc">Скрытая копия</string>
|
||||
<string name="font_size_message_view_additional_headers">дополнительные заголовки</string>
|
||||
<string name="font_size_message_view_subject">Тема</string>
|
||||
<string name="font_size_message_view_time">Время</string>
|
||||
<string name="font_size_message_view_date">Дата</string>
|
||||
<string name="font_size_message_view_date">Время и дата</string>
|
||||
<string name="font_size_message_view_content">Тело сообщения</string>
|
||||
|
||||
<string name="font_size_message_compose">Поле сообщения</string>
|
||||
|
@ -896,8 +896,7 @@ Vänligen skicka felrapporter, hjälp till med nya funktioner och ställ frågor
|
||||
<string name="font_size_message_view_cc">Mottagare (CC)</string>
|
||||
<string name="font_size_message_view_additional_headers">Ytterligare huvuden</string>
|
||||
<string name="font_size_message_view_subject">Ämne</string>
|
||||
<string name="font_size_message_view_time">Tid</string>
|
||||
<string name="font_size_message_view_date">Datum</string>
|
||||
<string name="font_size_message_view_date">Tid och datum</string>
|
||||
<string name="font_size_message_view_content">Innehåll</string>
|
||||
|
||||
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
|
||||
|
@ -895,8 +895,7 @@ Lütfen hata raporlarınızı, istediğiniz yeni özellikleri ve sorularınızı
|
||||
<string name="font_size_message_view_cc">Cc</string>
|
||||
<string name="font_size_message_view_additional_headers">Ek başlıklar</string>
|
||||
<string name="font_size_message_view_subject">Konu</string>
|
||||
<string name="font_size_message_view_time">Zaman</string>
|
||||
<string name="font_size_message_view_date">Tarih</string>
|
||||
<string name="font_size_message_view_date">Saat ve Tarih</string>
|
||||
<string name="font_size_message_view_content">Mesaj gövdesi</string>
|
||||
|
||||
<string name="font_size_message_compose">Mesaj oluşturma</string>
|
||||
|
@ -895,8 +895,7 @@ K-9 Mail це поштовий клієнт з відкритим вихідни
|
||||
<string name="font_size_message_view_cc">Копія</string>
|
||||
<string name="font_size_message_view_additional_headers">Додаткові заголовки</string>
|
||||
<string name="font_size_message_view_subject">Тема</string>
|
||||
<string name="font_size_message_view_time">Час</string>
|
||||
<string name="font_size_message_view_date">Дата</string>
|
||||
<string name="font_size_message_view_date">Час і дата</string>
|
||||
<string name="font_size_message_view_content">Тіло повідомлення</string>
|
||||
|
||||
<string name="font_size_message_compose">Створення повідомлень</string>
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="message_list_item_footer_background">#eeeeee</color>
|
||||
<color name="message_view_header_background">#45bcbcbc</color>
|
||||
</resources>
|
||||
|
@ -934,8 +934,7 @@ Please submit bug reports, contribute new features and ask questions at
|
||||
<string name="font_size_message_view_cc">Cc</string>
|
||||
<string name="font_size_message_view_additional_headers">Additional headers</string>
|
||||
<string name="font_size_message_view_subject">Subject</string>
|
||||
<string name="font_size_message_view_time">Time</string>
|
||||
<string name="font_size_message_view_date">Date</string>
|
||||
<string name="font_size_message_view_date">Time and date</string>
|
||||
<string name="font_size_message_view_content">Message body</string>
|
||||
|
||||
<string name="font_size_message_compose">Message composition</string>
|
||||
|
@ -129,14 +129,6 @@
|
||||
android:entryValues="@array/font_values"
|
||||
android:dialogTitle="@string/font_size_message_view_subject" />
|
||||
|
||||
<ListPreference
|
||||
android:persistent="false"
|
||||
android:key="message_view_time_font"
|
||||
android:title="@string/font_size_message_view_time"
|
||||
android:entries="@array/font_entries"
|
||||
android:entryValues="@array/font_values"
|
||||
android:dialogTitle="@string/font_size_message_view_time" />
|
||||
|
||||
<ListPreference
|
||||
android:persistent="false"
|
||||
android:key="message_view_date_font"
|
||||
|
@ -26,7 +26,6 @@ public class FontSizes {
|
||||
private static final String MESSAGE_VIEW_CC = "fontSizeMessageViewCC";
|
||||
private static final String MESSAGE_VIEW_ADDITIONAL_HEADERS = "fontSizeMessageViewAdditionalHeaders";
|
||||
private static final String MESSAGE_VIEW_SUBJECT = "fontSizeMessageViewSubject";
|
||||
private static final String MESSAGE_VIEW_TIME = "fontSizeMessageViewTime";
|
||||
private static final String MESSAGE_VIEW_DATE = "fontSizeMessageViewDate";
|
||||
private static final String MESSAGE_VIEW_CONTENT = "fontSizeMessageViewContent";
|
||||
private static final String MESSAGE_COMPOSE_INPUT = "fontSizeMessageComposeInput";
|
||||
@ -110,12 +109,7 @@ public class FontSizes {
|
||||
private int messageViewSubject;
|
||||
|
||||
/**
|
||||
* Font size of the message time in the message view activity.
|
||||
*/
|
||||
private int messageViewTime;
|
||||
|
||||
/**
|
||||
* Font size of the message date in the message view activity.
|
||||
* Font size of the message date and time in the message view activity.
|
||||
*/
|
||||
private int messageViewDate;
|
||||
|
||||
@ -152,7 +146,6 @@ public class FontSizes {
|
||||
messageViewCC = FONT_DEFAULT;
|
||||
messageViewAdditionalHeaders = FONT_DEFAULT;
|
||||
messageViewSubject = FONT_DEFAULT;
|
||||
messageViewTime = FONT_DEFAULT;
|
||||
messageViewDate = FONT_DEFAULT;
|
||||
|
||||
messageComposeInput = MEDIUM;
|
||||
@ -180,7 +173,6 @@ public class FontSizes {
|
||||
editor.putInt(MESSAGE_VIEW_CC, messageViewCC);
|
||||
editor.putInt(MESSAGE_VIEW_ADDITIONAL_HEADERS, messageViewAdditionalHeaders);
|
||||
editor.putInt(MESSAGE_VIEW_SUBJECT, messageViewSubject);
|
||||
editor.putInt(MESSAGE_VIEW_TIME, messageViewTime);
|
||||
editor.putInt(MESSAGE_VIEW_DATE, messageViewDate);
|
||||
editor.putInt(MESSAGE_VIEW_CONTENT, getMessageViewContentAsInt());
|
||||
|
||||
@ -209,7 +201,6 @@ public class FontSizes {
|
||||
messageViewCC = prefs.getInt(MESSAGE_VIEW_CC, messageViewCC);
|
||||
messageViewAdditionalHeaders = prefs.getInt(MESSAGE_VIEW_ADDITIONAL_HEADERS, messageViewAdditionalHeaders);
|
||||
messageViewSubject = prefs.getInt(MESSAGE_VIEW_SUBJECT, messageViewSubject);
|
||||
messageViewTime = prefs.getInt(MESSAGE_VIEW_TIME, messageViewTime);
|
||||
messageViewDate = prefs.getInt(MESSAGE_VIEW_DATE, messageViewDate);
|
||||
setMessageViewContent(prefs.getInt(MESSAGE_VIEW_CONTENT, 3));
|
||||
|
||||
@ -320,14 +311,6 @@ public class FontSizes {
|
||||
this.messageViewSubject = messageViewSubject;
|
||||
}
|
||||
|
||||
public int getMessageViewTime() {
|
||||
return messageViewTime;
|
||||
}
|
||||
|
||||
public void setMessageViewTime(int messageViewTime) {
|
||||
this.messageViewTime = messageViewTime;
|
||||
}
|
||||
|
||||
public int getMessageViewDate() {
|
||||
return messageViewDate;
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ public class FontSizeSettings extends K9PreferenceActivity {
|
||||
private static final String PREFERENCE_MESSAGE_VIEW_CC_FONT = "message_view_cc_font";
|
||||
private static final String PREFERENCE_MESSAGE_VIEW_ADDITIONAL_HEADERS_FONT = "message_view_additional_headers_font";
|
||||
private static final String PREFERENCE_MESSAGE_VIEW_SUBJECT_FONT = "message_view_subject_font";
|
||||
private static final String PREFERENCE_MESSAGE_VIEW_TIME_FONT = "message_view_time_font";
|
||||
private static final String PREFERENCE_MESSAGE_VIEW_DATE_FONT = "message_view_date_font";
|
||||
private static final String PREFERENCE_MESSAGE_VIEW_CONTENT_FONT = "message_view_content_font";
|
||||
private static final String PREFERENCE_MESSAGE_COMPOSE_INPUT_FONT = "message_compose_input_font";
|
||||
@ -50,7 +49,6 @@ public class FontSizeSettings extends K9PreferenceActivity {
|
||||
private ListPreference mMessageViewCC;
|
||||
private ListPreference mMessageViewAdditionalHeaders;
|
||||
private ListPreference mMessageViewSubject;
|
||||
private ListPreference mMessageViewTime;
|
||||
private ListPreference mMessageViewDate;
|
||||
private ListPreference mMessageViewContent;
|
||||
private ListPreference mMessageComposeInput;
|
||||
@ -115,9 +113,6 @@ public class FontSizeSettings extends K9PreferenceActivity {
|
||||
mMessageViewSubject = setupListPreference(
|
||||
PREFERENCE_MESSAGE_VIEW_SUBJECT_FONT,
|
||||
Integer.toString(fontSizes.getMessageViewSubject()));
|
||||
mMessageViewTime = setupListPreference(
|
||||
PREFERENCE_MESSAGE_VIEW_TIME_FONT,
|
||||
Integer.toString(fontSizes.getMessageViewTime()));
|
||||
mMessageViewDate = setupListPreference(
|
||||
PREFERENCE_MESSAGE_VIEW_DATE_FONT,
|
||||
Integer.toString(fontSizes.getMessageViewDate()));
|
||||
@ -153,7 +148,6 @@ public class FontSizeSettings extends K9PreferenceActivity {
|
||||
fontSizes.setMessageViewCC(Integer.parseInt(mMessageViewCC.getValue()));
|
||||
fontSizes.setMessageViewAdditionalHeaders(Integer.parseInt(mMessageViewAdditionalHeaders.getValue()));
|
||||
fontSizes.setMessageViewSubject(Integer.parseInt(mMessageViewSubject.getValue()));
|
||||
fontSizes.setMessageViewTime(Integer.parseInt(mMessageViewTime.getValue()));
|
||||
fontSizes.setMessageViewDate(Integer.parseInt(mMessageViewDate.getValue()));
|
||||
fontSizes.setMessageViewContent(Integer.parseInt(mMessageViewContent.getValue()));
|
||||
|
||||
|
@ -128,11 +128,6 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
||||
|
||||
mMessageHelper = MessageHelper.getInstance(mContext);
|
||||
|
||||
|
||||
resetViews();
|
||||
}
|
||||
|
||||
private void resetViews() {
|
||||
mSubjectView.setVisibility(VISIBLE);
|
||||
hideAdditionalHeaders();
|
||||
}
|
||||
@ -250,10 +245,20 @@ public class MessageHeader extends ScrollView implements OnClickListener {
|
||||
counterpartyAddress = fromAddrs[0].getAddress();
|
||||
}
|
||||
|
||||
/*
|
||||
* Only reset visibility of the subject if populate() was called because a new
|
||||
* message is shown. If it is the same, do not force the subject visible, because
|
||||
* this breaks the MessageTitleView in the action bar, which may hide our subject
|
||||
* if it fits in the action bar but is only called when a new message is shown
|
||||
* or the device is rotated.
|
||||
*/
|
||||
if (mMessage == null || mMessage.getId() != message.getId()) {
|
||||
mSubjectView.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
mMessage = message;
|
||||
mAccount = account;
|
||||
|
||||
resetViews();
|
||||
if (K9.showContactPicture()) {
|
||||
mContactBadge.setVisibility(View.VISIBLE);
|
||||
mContactsPictureLoader = new ContactPictureLoader(mContext, R.drawable.ic_contact_picture);
|
||||
|
@ -12,7 +12,11 @@ import android.widget.TextView;
|
||||
* action bar's title view.
|
||||
*/
|
||||
public class MessageTitleView extends TextView {
|
||||
private static final int MAX_LINES = 2;
|
||||
private static final String ELLIPSIS = "\u2026";
|
||||
|
||||
private MessageHeader mHeader;
|
||||
private boolean mNeedEllipsizeCheck = true;
|
||||
|
||||
public MessageTitleView(Context context) {
|
||||
this(context, null);
|
||||
@ -26,13 +30,32 @@ public class MessageTitleView extends TextView {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTextChanged(CharSequence text, int start,
|
||||
int lengthBefore, int lengthAfter) {
|
||||
super.onTextChanged(text, start, lengthBefore, lengthAfter);
|
||||
mNeedEllipsizeCheck = true;
|
||||
}
|
||||
/**
|
||||
* Check to see if we need to hide the subject line in {@link MessageHeader} or not.
|
||||
*/
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
if (mHeader != null && getLayout() != null && getLayout().getEllipsisCount(1) == 0) {
|
||||
mHeader.hideSubjectLine();
|
||||
/*
|
||||
* Android does not support ellipsize in combination with maxlines
|
||||
* for TextViews. To work around that, check for ourselves whether
|
||||
* the text is longer than MAX_LINES, and ellipsize manually.
|
||||
*/
|
||||
if (mNeedEllipsizeCheck) {
|
||||
if (getLayout() != null && mHeader != null) {
|
||||
if (getLayout().getLineCount() > MAX_LINES) {
|
||||
int lineEndIndex = getLayout().getLineEnd(MAX_LINES - 1);
|
||||
setText(getText().subSequence(0, lineEndIndex - 2) + ELLIPSIS);
|
||||
} else {
|
||||
mHeader.hideSubjectLine();
|
||||
}
|
||||
mNeedEllipsizeCheck = false;
|
||||
}
|
||||
}
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user