project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/LobbyChatFragment.java
changeset 7444 2e31f114f57e
parent 7358 57a508884052
equal deleted inserted replaced
7439:0a494f951dcf 7444:2e31f114f57e
    56 		netconn.lobbyChatlog.unregisterObserver(adapter);
    56 		netconn.lobbyChatlog.unregisterObserver(adapter);
    57 	}
    57 	}
    58 
    58 
    59 	private final class ChatSendListener implements OnEditorActionListener {
    59 	private final class ChatSendListener implements OnEditorActionListener {
    60 		public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    60 		public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    61 			boolean handled = false;
    61 			String text = v.getText().toString();
    62 			if(actionId == EditorInfo.IME_ACTION_SEND) {
    62 			if(text.length()>0) {
    63 				String text = v.getText().toString();
    63 				v.setText("");
    64 				if(text.length()>0) {
    64 				netconn.sendChat(text);
    65 					v.setText("");
       
    66 					netconn.sendChat(text);
       
    67 					handled = true;
       
    68 				}
       
    69 			}
    65 			}
    70 			return handled;
    66 			return true;
    71 		}
    67 		}
    72 	}
    68 	}
    73 }
    69 }