Commit 7dd2e8db authored by Adrien Dorsaz's avatar Adrien Dorsaz

Removes useless mArticleList private field (all informations are in mArticleAdapter).

parent a3420cbd
package ch.adorsaz.loungeDroid.activities;
import java.util.LinkedList;
import java.util.List;
import ch.adorsaz.loungeDroid.R;
......@@ -32,7 +33,6 @@ import android.widget.TextView;
public class ArticleListActivity extends ListActivity {
private List<Article> mArticleList = null;
private ArticleAdapter mArticleAdapter = null;
private ToDisplay mDisplayChoice = null;
......@@ -135,20 +135,21 @@ public class ArticleListActivity extends ListActivity {
public void updateArticleList(List<Article> articleList) {
mArticleList = articleList;
mArticleAdapter = new ArticleAdapter(getApplicationContext(),
R.layout.articlelist_item,, mArticleList);
R.layout.articlelist_item,, articleList);
private void updateArticleAdapter() {
ListView listView = getListView();
listView.setScrollingCacheEnabled(false); // TODO : Just save some
// memory, check if needed
listView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Intent intent = new Intent(ArticleListActivity.this,
intent.putExtra(ARTICLE_KEY, mArticleList.get(position));
intent.putExtra(ARTICLE_KEY, mArticleAdapter.getItem(position));
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