summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/ProviderListFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/bitmaskclient/ProviderListFragment.java')
-rw-r--r--src/se/leap/bitmaskclient/ProviderListFragment.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/se/leap/bitmaskclient/ProviderListFragment.java b/src/se/leap/bitmaskclient/ProviderListFragment.java
index 84d46a11..862177a2 100644
--- a/src/se/leap/bitmaskclient/ProviderListFragment.java
+++ b/src/se/leap/bitmaskclient/ProviderListFragment.java
@@ -155,7 +155,7 @@ public class ProviderListFragment extends ListFragment {
// Notify the active callbacks interface (the activity, if the
// fragment is attached to one) that an item has been selected.
- mCallbacks.onItemSelected(ProviderListContent.ITEMS.get(position).id);
+ mCallbacks.onItemSelected(ProviderListContent.ITEMS.get(position).name());
for(int item_position = 0; item_position < listView.getCount(); item_position++) {
if(item_position != position)
@@ -172,6 +172,9 @@ public class ProviderListFragment extends ListFragment {
}
}
+ public void notifyAdapter() {
+ content_adapter.notifyDataSetChanged();
+ }
/**
* Turns on activate-on-click mode. When this mode is on, list items will be
* given the 'activated' state when touched.
@@ -196,10 +199,15 @@ public class ProviderListFragment extends ListFragment {
public void addItem(ProviderItem provider) {
content_adapter.add(provider);
+ content_adapter.notifyDataSetChanged();
}
- public void hide(int position) {
- content_adapter.hide(position);
+ public void hideAllBut(int position) {
+ for(int i = 0; i < content_adapter.getCount(); i++)
+ if(i != position)
+ content_adapter.hide(i);
+ else
+ content_adapter.unHide(i);
}
public void unhideAll() {