我有一個簡單的ParseQuery,它檢索一個類'PrivateData'的單個對象。如何使用從parse.com數據庫檢索的數據動態添加cardslib CardListView標題文本?
ParseQuery<PrivateData> query = ParseQuery.getQuery(PrivateData.class);
query.whereEqualTo("user", ParseUser.getCurrentUser());
此代碼可以用來填充我的listView與來自PrivateData類的數據。
但我的要求是有一個CardListView和填充標題。
如何設置卡片標題與我從parse.com得到的數據?
public class HistoryActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.history_fragment);
// get action bar
android.support.v7.app.ActionBar actionBar = getSupportActionBar();
// Enabling Up/Back navigation
actionBar.setDisplayHomeAsUpEnabled(true);
/*
1. Issue the parse query
2. Set the result from the query to each card title of CardListView
3. Repeat step 1 and step 2 until we get all the results and they are populated dynamically in CardsListView
*/
}