commit ea76782d864754b1c637cd177787559ebfcdeb35
parent 7f74cf334317960ba2d349f95531f037e43fba96
Author: Jan Dankert <devnull@localhost>
Date: Tue, 24 Jan 2012 21:14:33 +0100
Listadapter nach Nachladen nicht neu erzeugen.
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/de/mtbnews/android/TopicActivity.java b/src/de/mtbnews/android/TopicActivity.java
@@ -19,6 +19,7 @@ import android.preference.PreferenceManager;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AdapterView;
+import android.widget.BaseAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.AbsListView.OnScrollListener;
@@ -85,10 +86,9 @@ public class TopicActivity extends ListActivity
topic = client.getTopic(topicId, start, end);
-
postCount = topic.getPostCount();
posts = topic.getPosts();
-
+
loadingMore = false;
}
catch (TapatalkException e)
@@ -170,7 +170,6 @@ public class TopicActivity extends ListActivity
Topic topic = client.getTopic(topicId, start,
end);
-
postCount = topic.getPostCount();
posts.addAll(topic.getPosts());
@@ -184,11 +183,8 @@ public class TopicActivity extends ListActivity
protected void doOnSuccess()
{
- TopicActivity.this.setTitle(topic.getTitle());
-
- ListAdapter adapter = new ListEntryContentAdapter(
- TopicActivity.this, posts);
- setListAdapter(adapter);
+ ((BaseAdapter) getListAdapter())
+ .notifyDataSetChanged();
}
}.execute();