public class HomepageActivity extends ActionBarActivity {
protected List<ParseObject> mStatus;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_homepage);
Parse.initialize(this, "dcAMNT7HVOmOw0JDMelkg5UDr388O3xSgICiSK3N", "1aHIAldsUScxlbkWGkoyvHoHWM9YEtpTb6QIijrb");
ParseUser currentUser = ParseUser.getCurrentUser();
if (currentUser != null) {
// show user the homepage status
ParseQuery<ParseObject> query = ParseQuery.getQuery("Status");
query.whereEqualTo("playerName", "Dan Stemkoski");
query.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> status, ParseException e) {
if (e == null) {
//success
mStatus = status;
StatusAdapter adapter = new StatusAdapter(getListView().getContext(),mStatus);
setListadapter(adapter);
} else {
//there was a problem, Alert user
}
}
});
I am stuck because I need a list activity and I need to use a List adapter but I am using my HomepageActiviy extends ActionBarActivity. The only way it works is if I change the extends to List Activity but then my action bar with my settings wont show on the top only on the button when I press the left button on my s4.