mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-22 15:48:50 -05:00
8d4a82ba0e
- Android does not support ellipsize in combination with maxlines for TextViews. This caused getEllipsisCount() in MessageTitleView to always fail, and the full subject was never shown in the regular headers area when needed. To work around that, check for ourselves whether the text is longer than 2, and ellipsize manually. - Clicking the star button on a message caused the subject line to re-appear, even if it fits in the action bar title without being cut off. This was caused by MessageHeader.populate(), which always set the subject to visible. As a workaround: Only set subject to visible in case populate() actually shows a new message. - delete res/layout/actionbar_message_view.xml, its already present in the actionbar_custom.xml
70 lines
2.5 KiB
XML
70 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content" >
|
|
|
|
<LinearLayout
|
|
android:id="@+id/actionbar_message_list"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal" >
|
|
|
|
<LinearLayout
|
|
android:id="@+id/title_layout"
|
|
android:layout_width="0dip"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical" >
|
|
|
|
<TextView
|
|
android:id="@+id/actionbar_title_first"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="start"
|
|
android:singleLine="true"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/actionbar_title_sub"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:singleLine="true"
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
android:textSize="12sp" />
|
|
</LinearLayout>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/actionbar_progress"
|
|
style="?android:attr/indeterminateProgressStyle"
|
|
android:layout_width="32dp"
|
|
android:layout_height="32dp"
|
|
android:layout_gravity="center"
|
|
android:visibility="gone" />
|
|
|
|
<TextView
|
|
android:id="@+id/actionbar_unread_count"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingLeft="12dip"
|
|
android:paddingRight="12dip"
|
|
android:textColor="?android:attr/textColorTertiary"
|
|
android:textSize="32sp" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/actionbar_message_view"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone" >
|
|
|
|
<com.fsck.k9.view.MessageTitleView
|
|
android:id="@+id/message_title_view"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:includeFontPadding="false"
|
|
android:textSize="16sp" />
|
|
</LinearLayout>
|
|
|
|
</FrameLayout> |