如何为不同的值显示相同的ListView?

时间:2012-10-03 12:15:32

标签: android listview android-intent globalization

我有一个分类列表&我想在我的项目中实现History.Java。其具有与类别列表相同的字段或参数。现在如何对历史使用相同的ListView。我正在使用全局boolean函数。我认为它会起作用。但我想知道任何好的技术。请告诉我?我想为历史记录调用相同的Category.Java类。分类清单。

2 个答案:

答案 0 :(得分:1)

  

您还可以在Intent

中传递1维数组列表
Bundle intentbundle = new Bundle();
        intentbundle.putStringArrayList("arrList",arrList);

       intent.putExtras(intentbundle);

       startActivity(intent);
  

并通过nex活动获取值

Bundle extras = getIntent().getExtras();
mArrList = extras.getStringArrayList("arrList");

答案 1 :(得分:0)

创建ListView适配器。然后,您将一些数据放入适配器,在Listview中设置,您的数据将被更改。 请在此处阅读:http://www.vogella.com/articles/AndroidListView/article.html