Search in sources :

Example 1 with VirtualClassementRider

use of ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider in project app by TourLive.

the class VirtualClassFragment method intiTable.

private void intiTable(View root) {
    recyclerAdapter = new RecyclerAdapter();
    recyclerAdapter.setEmptyItem(new EmptyItem(getString(android.R.string.cancel)));
    recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
    recyclerView.setAdapter(recyclerAdapter);
    for (Rider r : RiderPresenter.getInstance().getAllRidersReturned()) {
        recyclerAdapter.add(new VirtualClassementRider(this, mContext, r));
    }
}
Also used : RecyclerAdapter(net.gotev.recycleradapter.RecyclerAdapter) VirtualClassementRider(ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider) EmptyItem(ch.hsr.sa.radiotour.presentation.models.EmptyItem) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) Rider(ch.hsr.sa.radiotour.dataaccess.models.Rider) VirtualClassementRider(ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider)

Example 2 with VirtualClassementRider

use of ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider in project app by TourLive.

the class VirtualClassFragment method updateRiders.

public void updateRiders(RealmList<Rider> riders) {
    recyclerAdapter.clear();
    for (Rider r : riders) {
        recyclerAdapter.add(new VirtualClassementRider(this, mContext, r));
    }
    recyclerAdapter.notifyDataSetChanged();
}
Also used : VirtualClassementRider(ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider) Rider(ch.hsr.sa.radiotour.dataaccess.models.Rider) VirtualClassementRider(ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider)

Aggregations

Rider (ch.hsr.sa.radiotour.dataaccess.models.Rider)2 VirtualClassementRider (ch.hsr.sa.radiotour.presentation.models.VirtualClassementRider)2 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 EmptyItem (ch.hsr.sa.radiotour.presentation.models.EmptyItem)1 RecyclerAdapter (net.gotev.recycleradapter.RecyclerAdapter)1