为了从他的列表视图中查找关键项目,我没有在适配器中使用过滤器,但是现在按照此链接添加了过滤器,但在这一行中String playerName=songsList.get(i).get("title").toString();我收到了错误
The method get(String) is undefined for the type String
Run Code Online (Sandbox Code Playgroud)
并且在searchResults.add(songsList.get(i));作为
The method add(HashMap<String,String>) in the type ArrayList<HashMap<String,String>> is not applicable for the arguments (String)
Run Code Online (Sandbox Code Playgroud)
这是我的全部代码
public class Home extends ListActivity {
//how many to load on reaching the bottom
int itemsPerPage = 15;
boolean loadingMore = false;
//For test data :-)
Calendar d = Calendar.getInstance();
ArrayList<String> songsList;
ListView list;
LazyAdapter adapter;
JSONArray posts;
//ArrayList thats going to hold the search results
ArrayList<HashMap<String, …Run Code Online (Sandbox Code Playgroud)