From 1ac5be485502e7d6d4c117335e083c684739e6af Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 31 Aug 2014 16:28:21 +0200 Subject: some code cleanup --- .../conversations/ui/ChooseContactActivity.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/eu/siacs/conversations/ui/ChooseContactActivity.java') diff --git a/src/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/eu/siacs/conversations/ui/ChooseContactActivity.java index 4236ea70..83b20cb9 100644 --- a/src/eu/siacs/conversations/ui/ChooseContactActivity.java +++ b/src/eu/siacs/conversations/ui/ChooseContactActivity.java @@ -23,13 +23,13 @@ import eu.siacs.conversations.entities.ListItem; import eu.siacs.conversations.ui.adapter.ListItemAdapter; public class ChooseContactActivity extends XmppActivity { - + private ListView mListView; private ArrayList contacts = new ArrayList(); private ArrayAdapter mContactsAdapter; - + private EditText mSearchEditText; - + private TextWatcher mSearchTextWatcher = new TextWatcher() { @Override @@ -47,7 +47,7 @@ public class ChooseContactActivity extends XmppActivity { int count) { } }; - + private MenuItem.OnActionExpandListener mOnActionExpandListener = new MenuItem.OnActionExpandListener() { @Override @@ -76,35 +76,35 @@ public class ChooseContactActivity extends XmppActivity { return true; } }; - - - + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_choose_contact); mListView = (ListView) findViewById(R.id.choose_contact_list); - mContactsAdapter = new ListItemAdapter(getApplicationContext(), contacts); + mContactsAdapter = new ListItemAdapter(getApplicationContext(), + contacts); mListView.setAdapter(mContactsAdapter); mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override - public void onItemClick(AdapterView arg0, View arg1, int position, - long arg3) { + public void onItemClick(AdapterView arg0, View arg1, + int position, long arg3) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(mSearchEditText.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); Intent request = getIntent(); Intent data = new Intent(); - data.putExtra("contact",contacts.get(position).getJid()); - data.putExtra("account",request.getStringExtra("account")); - data.putExtra("conversation",request.getStringExtra("conversation")); + data.putExtra("contact", contacts.get(position).getJid()); + data.putExtra("account", request.getStringExtra("account")); + data.putExtra("conversation", + request.getStringExtra("conversation")); setResult(RESULT_OK, data); finish(); } }); } - + @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.choose_contact, menu); @@ -121,7 +121,7 @@ public class ChooseContactActivity extends XmppActivity { void onBackendConnected() { filterContacts(null); } - + protected void filterContacts(String needle) { this.contacts.clear(); for (Account account : xmppConnectionService.getAccounts()) { -- cgit v1.2.3