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

Commit bc6929e9 authored by Jesse Vincent's avatar Jesse Vincent
Browse files

Added key bindings in message view

parent ca569d99
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.os.Process;
import android.text.util.Regex;
import android.util.Config;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -95,6 +96,23 @@ public class MessageView extends Activity
    private Listener mListener = new Listener();
    private MessageViewHandler mHandler = new MessageViewHandler();


    
    
       public boolean onKeyDown(int keyCode, KeyEvent event) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_DEL: { onDelete(); break;}
            case KeyEvent.KEYCODE_F: { onForward(); break;}
            case KeyEvent.KEYCODE_A: { onReplyAll(); break; }
            case KeyEvent.KEYCODE_R: { onReply(); break; }
            case KeyEvent.KEYCODE_J: { onPrevious(); break; }
            case KeyEvent.KEYCODE_K: { onNext(); break; }
            }
        return true;
        }
 


    class MessageViewHandler extends Handler {
        private static final int MSG_PROGRESS = 2;
        private static final int MSG_ADD_ATTACHMENT = 3;
@@ -218,6 +236,9 @@ public class MessageView extends Activity
            msg.arg1 = show ? 1 : 0;
            sendMessage(msg);
        }
    
    
    
    }

    class Attachment {