【发布时间】:2017-09-07 21:30:28
【问题描述】:
我在这个项目中工作,但我不知道如何反向显示列表视图(升序)
艺人类
public class Artistlist extends ArrayAdapter<Artist> {
private Activity context;
private List<Artist> artistList;
public Artistlist(Activity context,List<Artist> artistList){
super(context,R.layout.list_layout , artistList);
this.context = context;
this.artistList = artistList;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
View listViewItem = inflater.inflate(R.layout.list_layout,null,true);
TextView textViewname = (TextView) listViewItem.findViewById(R.id.textView);
TextView textViewGener = (TextView) listViewItem.findViewById(R.id.textView2);
Artist artist = artistList.get(position);
textViewname.setText(artist.getArtistName());
textViewGener.setText(artist.getArtistGener());
return listViewItem;
}
}
如何反向显示列表视图(升序) 谢谢你
【问题讨论】:
标签: android database sorting listview firebase