summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-08-29 11:02:58 +0200
committercyBerta <richy@cyborgsociety.org>2013-11-15 23:25:16 +0100
commit1d57d052814b8d46f3bdc850893171f238cdb2ef (patch)
treeb5833bd8245f052a19c2b3be196204ee90110324 /src/se/leap/leapclient
parent54cd37ae861e57b33c0a6f1b6b5098da848ec05b (diff)
Only selected provider remain visible.
The progressbar is always below the first row, because only the selected provider row remain visible. If the user cancels the ProviderDetailFragment, all providers appear again. Next step: implement the same behaviour with the new provider usecase.
Diffstat (limited to 'src/se/leap/leapclient')
-rw-r--r--src/se/leap/leapclient/ProviderListAdapter.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/se/leap/leapclient/ProviderListAdapter.java b/src/se/leap/leapclient/ProviderListAdapter.java
index 441763d0..61fe6bfa 100644
--- a/src/se/leap/leapclient/ProviderListAdapter.java
+++ b/src/se/leap/leapclient/ProviderListAdapter.java
@@ -1,12 +1,8 @@
package se.leap.leapclient;
import java.util.List;
-import java.lang.reflect.Array;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
import android.content.Context;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -68,8 +64,9 @@ public class ProviderListAdapter<T> extends ArrayAdapter<T> {
}
@Override
- public View getView(int position, View convertView, ViewGroup parent) {
- TwoLineListItem row;
+ public View getView(int index, View convertView, ViewGroup parent) {
+ TwoLineListItem row;
+ int position = getRealPosition(index);
if (convertView == null) {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
row = (TwoLineListItem)inflater.inflate(android.R.layout.simple_list_item_2, null);
@@ -79,6 +76,8 @@ public class ProviderListAdapter<T> extends ArrayAdapter<T> {
ProviderListContent.ProviderItem data = ProviderListContent.ITEMS.get(position);
row.getText1().setText(data.domain);
row.getText2().setText(data.name);
+
+
return row;
}