use of cl.smartcities.isci.transportinspector.adapters.RouterOptionAdapter in project androidApp by InspectorIncognito.
the class RouterSearchFragment method createAdapters.
private void createAdapters() {
recentPoints = new ArrayList<>();
recentPointsAdapter = new RouterRecentLocationsAdapter(getContext(), this);
routerOptionAdapter = new RouterOptionAdapter(getContext(), routeListener);
}
use of cl.smartcities.isci.transportinspector.adapters.RouterOptionAdapter in project androidApp by InspectorIncognito.
the class RouterVectorMapFragment method onCreateView.
@NonNull
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.activity_router_map_fragment, container, false);
mapView = view.findViewById(R.id.map_layout_id);
slidingPanel = view.findViewById(R.id.sliding_layout);
title = view.findViewById(R.id.header_title);
ListView listView = view.findViewById(R.id.list_view);
viewGroup = (LinearLayout) view.findViewById(R.id.dragView);
routerOptionAdapter = new RouterOptionAdapter(this.getContext(), new CustomArrayAdapter.ItemClickListener<Integer>() {
@Override
public void onItemClick(Integer item) {
if (slidingPanel.getPanelState().equals(SlidingUpPanelLayout.PanelState.COLLAPSED)) {
slidingPanel.setPanelState(SlidingUpPanelLayout.PanelState.ANCHORED);
} else {
slidingPanel.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
}
}
});
View defaultView = view.findViewById(R.id.subheader);
routerOptionAdapter.setDefaultView(defaultView);
View prevLayout = view.findViewById(R.id.prev_layout);
View nextLayout = view.findViewById(R.id.next_layout);
prevLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
contextListener.prevClicked();
}
});
nextLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
contextListener.nextClicked();
}
});
adapter = new StepAdapter(this.getContext(), this);
listView.setAdapter(adapter);
mapView.setVisibility(View.INVISIBLE);
return view;
}
Aggregations