我创建了一个警报系统,供护理人员用来为老年人设置警报。在此警报中,我如何获取已设置为顶部的最新警报,而不是每次都出现在底部
mListAdapter = new FirebaseListAdapter<notify>(this, notify.class, android.R.layout.two_line_list_item, mRoot) {
@Override
protected void populateView(View view, notify notify, int i) {
((TextView)view.findViewById(android.R.id.text1)).setText(notify.getCourse() + "Quantity:" + notify.getQuantity() +"," + notify.getRepeat());
((TextView)view.findViewById(android.R.id.text2)).setText("Medication set to " +notify.getDate() + " at " + notify.getTime());
}
}; listView.setAdapter(mListAdapter);