use of cl.smartcities.isci.transportinspector.adapters.BusAvatarRowAdapter in project androidApp by InspectorIncognito.
the class AccountBusPickerActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_user_bus_picker);
mapView = findViewById(R.id.map);
mapView.onCreate(savedInstanceState);
currentAccount = TranSappAccountManager.getCurrentAccount();
if (currentAccount == null) {
this.finish();
return;
}
serverBusAvatarId = currentAccount.getBusAvatarId();
busAvatarId = serverBusAvatarId;
// new ActiveBusView(this, "506v", serverBusAvatarId, false);
final ActiveBusView activeBusView = findViewById(R.id.active_bus);
activeBusView.setAvatarId(serverBusAvatarId);
RecyclerView recyclerView = findViewById(R.id.bus_picker_recycler_view);
BusAvatarRowAdapter adapter = new BusAvatarRowAdapter(this, AvatarLists.BUS_AVATARS, new BusAvatarRowAdapter.AvatarClickListener() {
@Override
public void onNewAvatarSelected(int serverId) {
busAvatarId = serverId;
activeBusView.setAvatarId(serverId);
}
}, currentAccount.getLevelPosition(), currentAccount.getBusAvatarId());
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
recyclerView.invalidate();
}
Aggregations