Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f5ed839 authored by Daniel Applebaum's avatar Daniel Applebaum
Browse files

Major ergonomic changes to control buttons in the MessageView

1) Eliminate the top row Next Message and Previous Message

2) In the bottom buttons for portrait mode, replace Reply and Forward
   with Prev and Next
   Justification: if you're going to be replying or forwarding, you're
   about to embark on a lot of typing, anyway.  Having to hit Menu
   isn't an undue burden.

3) Prev goes to the adjacent *older* message, next goes to the
   adjacent *newer* message

4) In the bottom buttons for landscape mode, added Prev and Next as the
   outer buttons

5) Add Account option for hiding the bottom buttons when the keyboard
   is available.

Also, temporarily (hopefully!) reverted the instant delete from the
MessageView because it isn't working right.  The method here is slower
but safer.

parent 7f2601df
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -22,11 +22,18 @@
        </LinearLayout>
    </ScrollView>
    <LinearLayout
    	android:id="@+id/bottom_buttons"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="57px"
        android:background="@drawable/ic_email_thread_open_bottom_default"
        android:gravity="center_vertical">
        <Button
           android:id="@+id/previous"
           android:text="@string/message_view_prev_action"
           android:layout_height="wrap_content"
           android:layout_width="0dip"
           android:layout_weight="1" />
        <Button
            android:id="@+id/reply"
            android:text="@string/reply_action"
@@ -45,5 +52,11 @@
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1" />
         <Button
            android:id="@+id/next"
            android:text="@string/message_view_next_action"
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1" />
    </LinearLayout>
</LinearLayout>
+20 −4
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1">
            <RelativeLayout
   <!--          <RelativeLayout
    			android:id="@+id/top_buttons"
                android:layout_width="fill_parent"
                android:layout_height="54px"
                android:paddingTop="4px">
@@ -37,23 +38,32 @@
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true" />
            </RelativeLayout>
            -->

            <include layout="@layout/message_view_header" />

        </LinearLayout>
    </ScrollView>
    <LinearLayout
    	android:id="@+id/bottom_buttons"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="57px"
        android:background="@drawable/ic_email_thread_open_bottom_default"
        android:gravity="center_vertical">
        <Button
 <!--         <Button
            android:id="@+id/reply"
            android:text="@string/reply_action"
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1" />-->
        <Button
            android:id="@+id/previous"
            android:text="@string/message_view_prev_action"
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1" />
            
        <Button
            android:id="@+id/delete"
            android:text="@string/delete_action"
@@ -61,10 +71,16 @@
            android:layout_width="0dip"
            android:layout_weight="1" />
       <Button
            android:id="@+id/next"
            android:text="@string/message_view_next_action"
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1" />            
 <!--         <Button
            android:id="@+id/forward"
            android:text="@string/forward_action"
            android:layout_height="wrap_content"
            android:layout_width="0dip"
            android:layout_weight="1" />
            android:layout_weight="1" /> -->
    </LinearLayout>
</LinearLayout>
+5 −2
Original line number Diff line number Diff line
@@ -144,8 +144,8 @@ Welcome to K-9 Mail setup. K-9 is an open source email client for Android based
    <string name="message_view_to_label">To:</string>
    <string name="message_view_attachment_view_action">Open</string>
    <string name="message_view_attachment_download_action">Save</string>
    <string name="message_view_prev_action">Prev message</string>
    <string name="message_view_next_action">Next message</string>
    <string name="message_view_prev_action">Prev</string>
    <string name="message_view_next_action">Next</string>
    <string name="message_view_datetime_fmt">MMM dd yyyy hh:mm a</string>
    <string name="message_view_status_attachment_saved">Attachment saved to SD card as <xliff:g id="filename">%s</xliff:g>.</string>
    <string name="message_view_status_attachment_not_saved">Unable to save attachment to SD card.</string>
@@ -282,6 +282,9 @@ Welcome to K-9 Mail setup. K-9 is an open source email client for Android based
    <string name="account_settings_notify_sync_summary">Notify in status bar while email is checked</string>
    <string name="account_settings_show_combined_label">Show combined Inbox</string>
    
    <string name="account_settings_hide_buttons_label">Hide buttons</string>
    <string name="account_settings_hide_buttons_summary">While viewing message if keyboard is available</string>
    
    <string name="account_settings_display_sync">Display and synchronization</string>
    
    <string name="account_settings_mail_check_frequency_label">Email check frequency</string>
+5 −0
Original line number Diff line number Diff line
@@ -38,6 +38,11 @@
            android:entryValues="@array/account_settings_display_count_values"
            android:dialogTitle="@string/account_settings_mail_display_count_label" />

       <CheckBoxPreference
            android:key="hide_buttons"
            android:title="@string/account_settings_hide_buttons_label"
            android:summary="@string/account_settings_hide_buttons_summary" />

	   	</PreferenceCategory>
	
    	<PreferenceCategory android:title="@string/account_settings_display_sync">
+14 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public class Account implements Serializable {
    boolean mVibrate;
    String mRingtoneUri;
    boolean mNotifySync;
    boolean mHideMessageViewButtons = false;
    
    public enum FolderMode {
    	ALL, FIRST_CLASS, FIRST_AND_SECOND_CLASS, NOT_SECOND_CLASS;
@@ -121,6 +122,7 @@ public class Account implements Serializable {
                "Outbox");
        mAccountNumber = preferences.mSharedPreferences.getInt(mUuid + ".accountNumber", 0);
        mVibrate = preferences.mSharedPreferences.getBoolean(mUuid + ".vibrate", false);
        mHideMessageViewButtons = preferences.mSharedPreferences.getBoolean(mUuid + ".hideButtons", false);
        mRingtoneUri = preferences.mSharedPreferences.getString(mUuid  + ".ringtone", 
                "content://settings/system/notification_sound");
        try
@@ -258,6 +260,7 @@ public class Account implements Serializable {
        editor.remove(mUuid + ".lastFullSync");
        editor.remove(mUuid + ".folderDisplayMode");
        editor.remove(mUuid + ".folderSyncMode");
        editor.remove(mUuid + ".hideButtons");
        editor.commit();
    }

@@ -319,6 +322,7 @@ public class Account implements Serializable {
        editor.putString(mUuid + ".outboxFolderName", mOutboxFolderName);
        editor.putInt(mUuid + ".accountNumber", mAccountNumber);
        editor.putBoolean(mUuid + ".vibrate", mVibrate);
        editor.putBoolean(mUuid + ".hideButtons", mHideMessageViewButtons);
        editor.putString(mUuid + ".ringtone", mRingtoneUri);
        editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name());
        editor.putString(mUuid + ".folderSyncMode", mFolderSyncMode.name());
@@ -520,4 +524,14 @@ public class Account implements Serializable {
      this.mNotifySync = showOngoing;
    }

    public boolean isHideMessageViewButtons()
    {
      return mHideMessageViewButtons;
    }

    public void setHideMessageViewButtons(boolean hideMessageViewButtons)
    {
      mHideMessageViewButtons = hideMessageViewButtons;
    }

}
Loading