public static StationCardFragment WithStation(SimpleStation station, BikeActionStatus status) { var r = new StationCardFragment (); r.station = station; r.status = status; return r; }
public static StationCardFragment WithStation(SimpleStation station, BikeActionStatus status) { var r = new StationCardFragment(); r.station = station; r.status = status; return(r); }
public static StationCardFragment WithStation (Station station, GeoPoint currentLocation, BikeActionStatus status) { var r = new StationCardFragment (); r.station = station; r.currentLocation = currentLocation; r.status = status; return r; }
public static StationCardFragment WithStation(Station station, GeoPoint currentLocation, BikeActionStatus status) { var r = new StationCardFragment(); r.station = station; r.currentLocation = currentLocation; r.status = status; return(r); }
public override Fragment GetFragment(int row, int column) { if (column == 1) { return(ActionButtonFragment.WithAction("Navigate", Resource.Drawable.navigate_button)); } if (column == 2) { return(ActionButtonFragment.WithAction("Add to Favorite", Resource.Drawable.favorite_button)); } return(StationCardFragment.WithStation(stations [row], currentLocation, status)); }
public override Fragment GetFragment(int row, int column) { var station = stations [row]; var id = station.Id; if (column == 1) { return(ActionButtonFragment.WithAction("Navigate", Resource.Drawable.navigate_button, () => actions.NavigateToStation(id))); } if (column == 2) { return(ActionButtonFragment.WithToggleAction(Tuple.Create("Favorite", "Unfavorite"), Resource.Drawable.favorite_button, station.IsFavorite, cked => actions.ToggleFavoriteStation(id, cked))); } return(stationFragments [row] ?? (stationFragments [row] = StationCardFragment.WithStation(station, actions.CurrentStatus))); }