Search in sources :

Example 1 with RequestersAdapter

use of br.ufrj.caronae.adapters.RequestersAdapter in project caronae-android by caronae.

the class RequestersListAct method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_requesters_list);
    ButterKnife.bind(this);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    final ActionBar ab = getSupportActionBar();
    if (ab != null) {
        ab.setDisplayHomeAsUpEnabled(true);
    }
    ArrayList<User> users = getIntent().getExtras().getParcelableArrayList("users");
    int rideId = getIntent().getExtras().getInt("rideId");
    int color = getIntent().getExtras().getInt("color");
    requestersList.setAdapter(new RequestersAdapter(users, rideId, color, this));
    requestersList.setHasFixedSize(true);
    requestersList.setLayoutManager(new LinearLayoutManager(this));
}
Also used : User(br.ufrj.caronae.models.User) RequestersAdapter(br.ufrj.caronae.adapters.RequestersAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ActionBar(android.support.v7.app.ActionBar) Toolbar(android.support.v7.widget.Toolbar)

Aggregations

ActionBar (android.support.v7.app.ActionBar)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 Toolbar (android.support.v7.widget.Toolbar)1 RequestersAdapter (br.ufrj.caronae.adapters.RequestersAdapter)1 User (br.ufrj.caronae.models.User)1