Commit 2af84378 authored by Grigory Fedorov's avatar Grigory Fedorov

GroupListActivity: "add group" footer button removed.

parent 6cc4cc51
...@@ -37,8 +37,7 @@ import com.xabber.xmpp.address.Jid; ...@@ -37,8 +37,7 @@ import com.xabber.xmpp.address.Jid;
import java.util.Collection; import java.util.Collection;
public class ContactEditor extends GroupListActivity implements public class ContactEditor extends GroupListActivity implements
OnContactChangedListener, AdapterView.OnItemClickListener, OnContactChangedListener, OnAccountChangedListener {
OnAccountChangedListener {
private String account; private String account;
private String user; private String user;
......
...@@ -39,8 +39,7 @@ import java.util.Collections; ...@@ -39,8 +39,7 @@ import java.util.Collections;
* *
* @author alexander.ivanov * @author alexander.ivanov
*/ */
public abstract class GroupListActivity extends ManagedListActivity implements public abstract class GroupListActivity extends ManagedListActivity implements OnGroupAddConfirmed {
OnItemClickListener, OnGroupAddConfirmed {
private static final String SAVED_GROUPS = "com.xabber.android.ui.ContactList.SAVED_GROUPS"; private static final String SAVED_GROUPS = "com.xabber.android.ui.ContactList.SAVED_GROUPS";
private static final String SAVED_SELECTED = "com.xabber.android.ui.ContactList.SAVED_SELECTED"; private static final String SAVED_SELECTED = "com.xabber.android.ui.ContactList.SAVED_SELECTED";
...@@ -69,15 +68,9 @@ public abstract class GroupListActivity extends ManagedListActivity implements ...@@ -69,15 +68,9 @@ public abstract class GroupListActivity extends ManagedListActivity implements
listView = getListView(); listView = getListView();
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
listView.setOnItemClickListener(this);
arrayAdapter = new ArrayAdapter<>(this, arrayAdapter = new ArrayAdapter<>(this,
android.R.layout.simple_list_item_multiple_choice, android.R.layout.simple_list_item_multiple_choice,
new ArrayList<String>()); new ArrayList<String>());
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.add_item, listView, false);
((TextView) view.findViewById(android.R.id.message))
.setText(R.string.group_add);
listView.addFooterView(view, null, true);
setListAdapter(arrayAdapter); setListAdapter(arrayAdapter);
setGroups(groups, selected); setGroups(groups, selected);
} }
...@@ -149,13 +142,6 @@ public abstract class GroupListActivity extends ManagedListActivity implements ...@@ -149,13 +142,6 @@ public abstract class GroupListActivity extends ManagedListActivity implements
GroupAddDialogFragment.newInstance(getGroups()).show(getFragmentManager(), "GROUP-ADD"); GroupAddDialogFragment.newInstance(getGroups()).show(getFragmentManager(), "GROUP-ADD");
} }
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
if (listView.getItemAtPosition(position) == null) // Footer
showGroupAddDialog();
}
/** /**
* Sets new list of groups and select specified groups. * Sets new list of groups and select specified groups.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment