クラス「PrivateData」の単一のオブジェクトを取得する単純なParseQueryがあります。
ParseQuery<PrivateData> query = ParseQuery.getQuery(PrivateData.class);
query.whereEqualTo("user", ParseUser.getCurrentUser());
このコードを使用して、PrivateData クラスのデータを listView に取り込むことができます。
しかし、私の要件は、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
*/
}