diff options
author | Sean Leonard <meanderingcode@aetherislands.net> | 2013-12-10 14:52:57 -0800 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2013-12-10 14:52:57 -0800 |
commit | 623cd76d9e1b26d81406fb886dea18a93dee8431 (patch) | |
tree | 8e8873e25448e3fa491d262bccc9353836675f75 /src/se | |
parent | fd2a47380aea5f526b5e92d44df0c5d7f5a064e6 (diff) | |
parent | f35ac034aae5c344bcb84e6bfb17fe0886a4042a (diff) |
Merge branch 'bug/configuring-progressbar-overlaps-provider-items' into develop
Diffstat (limited to 'src/se')
-rw-r--r-- | src/se/leap/bitmaskclient/ProviderListFragment.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/se/leap/bitmaskclient/ProviderListFragment.java b/src/se/leap/bitmaskclient/ProviderListFragment.java index 862177a2..501da609 100644 --- a/src/se/leap/bitmaskclient/ProviderListFragment.java +++ b/src/se/leap/bitmaskclient/ProviderListFragment.java @@ -156,11 +156,6 @@ 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).name());
-
- for(int item_position = 0; item_position < listView.getCount(); item_position++) {
- if(item_position != position)
- content_adapter.hide(item_position);
- }
}
@Override
@@ -203,11 +198,15 @@ public class ProviderListFragment extends ListFragment { }
public void hideAllBut(int position) {
- for(int i = 0; i < content_adapter.getCount(); i++)
- if(i != position)
+ int real_count = content_adapter.getCount();
+ for(int i = 0; i < real_count;)
+ if(i != position) {
content_adapter.hide(i);
- else
- content_adapter.unHide(i);
+ position--;
+ real_count--;
+ } else {
+ i++;
+ }
}
public void unhideAll() {
|