mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
commit
9960cb819e
@ -21,6 +21,7 @@ import android.text.Editable;
|
|||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -63,6 +64,7 @@ public class StartConversationActivity extends XmppActivity {
|
|||||||
private List<String> mKnownHosts;
|
private List<String> mKnownHosts;
|
||||||
private List<String> mKnownConferenceHosts;
|
private List<String> mKnownConferenceHosts;
|
||||||
|
|
||||||
|
private Menu mOptionsMenu;
|
||||||
private EditText mSearchEditText;
|
private EditText mSearchEditText;
|
||||||
|
|
||||||
public int conference_context_id;
|
public int conference_context_id;
|
||||||
@ -432,6 +434,7 @@ public class StartConversationActivity extends XmppActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
this.mOptionsMenu = menu;
|
||||||
getMenuInflater().inflate(R.menu.start_conversation, menu);
|
getMenuInflater().inflate(R.menu.start_conversation, menu);
|
||||||
MenuItem menuCreateContact = (MenuItem) menu
|
MenuItem menuCreateContact = (MenuItem) menu
|
||||||
.findItem(R.id.action_create_contact);
|
.findItem(R.id.action_create_contact);
|
||||||
@ -464,6 +467,17 @@ public class StartConversationActivity extends XmppActivity {
|
|||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onKeyUp(int keyCode, KeyEvent event)
|
||||||
|
{
|
||||||
|
if(keyCode == KeyEvent.KEYCODE_SEARCH && !event.isLongPress())
|
||||||
|
{
|
||||||
|
mOptionsMenu.findItem(R.id.action_search).expandActionView();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.onKeyUp(keyCode, event);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void onBackendConnected() {
|
void onBackendConnected() {
|
||||||
xmppConnectionService.setOnRosterUpdateListener(this.onRosterUpdate );
|
xmppConnectionService.setOnRosterUpdateListener(this.onRosterUpdate );
|
||||||
|
Loading…
Reference in New Issue
Block a user