Commit d8fc25cf authored by Lucas Braz Cunha's avatar Lucas Braz Cunha

Issue AGILE#225: Done schedules history activity.

Signed-off-by: Lucas Braz Cunha's avatarLucas B. Cunha <lbc16@inf.ufpr.br>
parent 8a8bc493
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "br.ufpr.c3sl.agendador.agendador"
minSdkVersion 19
......
......@@ -397,7 +397,8 @@ public class DependentUpdateActivity extends AppCompatActivity implements Depend
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
view.clearFocus();
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
if(imm != null)
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
AppBarLayout.Behavior behavior = (AppBarLayout.Behavior) params.getBehavior();
......
......@@ -28,7 +28,6 @@ import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import br.ufpr.c3sl.agendador.agendador.helpers.ObscuredSharedPreferences;
import br.ufpr.c3sl.agendador.agendador.helpers.UserImgHelper;
......@@ -132,7 +131,7 @@ public class HomeActivity extends AppCompatActivity implements HomeView,
navigationView.setNavigationItemSelectedListener(this);
Button bt_schedule = (Button) findViewById(R.id.btn_homeact_schedule);
Button bt_schedule = (Button) findViewById(R.id.bt_homeact_schedule);
bt_schedule.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -142,11 +141,21 @@ public class HomeActivity extends AppCompatActivity implements HomeView,
}
});
Button bt_checkSchedules = (Button) findViewById(R.id.btn_homeact_check);
Button bt_history = (Button) findViewById(R.id.bt_homeact_history);
bt_history.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(HomeActivity.this, SchedulesHistoryActivity.class);
startActivity(intent);
}
});
Button bt_checkSchedules = (Button) findViewById(R.id.bt_homeact_check);
bt_checkSchedules.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(HomeActivity.this, SchedulesActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
});
......@@ -156,6 +165,7 @@ public class HomeActivity extends AppCompatActivity implements HomeView,
@Override
public void onClick(View v) {
Intent intent = new Intent(HomeActivity.this, SchedulesActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
});
......@@ -238,22 +248,27 @@ public class HomeActivity extends AppCompatActivity implements HomeView,
switch (item.getItemId()) {
case R.id.nav_my_info:
intent = new Intent(this, AccountActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedule:
intent = new Intent(this, CitizenListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
return true;
case R.id.nav_check_schedules:
intent = new Intent(this, SchedulesActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
return true;
case R.id.nav_dependants:
intent = new Intent(this, DependentsListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedules_history:
intent = new Intent(this, SchedulesHistoryActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
default:
......
......@@ -212,6 +212,7 @@ public class ScheduleConfirmationActivity extends AppCompatActivity implements S
switch (item.getItemId()) {
case R.id.nav_my_info:
intent = new Intent(this, AccountActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedule:
......@@ -219,14 +220,17 @@ public class ScheduleConfirmationActivity extends AppCompatActivity implements S
break;
case R.id.nav_check_schedules:
intent = new Intent(this, SchedulesActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_dependants:
intent = new Intent(this, DependentsListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedules_history:
intent = new Intent(this, SchedulesHistoryActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
default:
......
......@@ -22,6 +22,8 @@ import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import org.w3c.dom.Text;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;
......@@ -45,6 +47,8 @@ public class ScheduleInfoActivity extends AppCompatActivity implements Navigatio
private static final String EXIT_CONFIRMATION_DIALOG_TAG = "exit_dialog";
private int caller;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -94,9 +98,6 @@ public class ScheduleInfoActivity extends AppCompatActivity implements Navigatio
});
navigationView.setCheckedItem(R.id.nav_check_schedules);
navigationView.setNavigationItemSelectedListener(this);
ActionMenuView actionMenuView = (ActionMenuView) toolbar.findViewById(R.id.agendador_toolbar_menu);
menuBuilder = (MenuBuilder) actionMenuView.getMenu();
......@@ -126,6 +127,8 @@ public class ScheduleInfoActivity extends AppCompatActivity implements Navigatio
TextView tv_type = (TextView) findViewById(R.id.tv_schedule_type_content);
TextView tv_date = (TextView) findViewById(R.id.tv_schedule_date_content);
TextView tv_address = (TextView) findViewById(R.id.tv_schedule_street_content);
TextView tv_situation = (TextView) findViewById(R.id.tv_schedule_situation);
TextView tv_situation_content = (TextView) findViewById(R.id.tv_schedule_situation_content);
tv_name.setText(name);
tv_sector.setText(schedule.getSectorName());
......@@ -134,9 +137,22 @@ public class ScheduleInfoActivity extends AppCompatActivity implements Navigatio
tv_date.setText(df.format(schedule.getStartTime()));
String address = schedule.getAddressStreet() + ", " + schedule.getAddressNumber();
tv_address.setText(address);
caller = bundle.getInt(Utils.CALLER_ACTIVITY);
if(caller == Utils.SCHEDULES_ACTIVITY){
navigationView.setCheckedItem(R.id.nav_check_schedules);
tv_situation.setVisibility(View.GONE);
tv_situation_content.setVisibility(View.GONE);
}else if(caller == Utils.HISTORY_ACTIVITY){
navigationView.setCheckedItem(R.id.nav_schedules_history);
tv_situation_content.setText(schedule.getSituation());
}
}
navigationView.setNavigationItemSelectedListener(this);
Button bt_back = (Button) findViewById(R.id.btn_schedule_info_back);
bt_back.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -153,21 +169,32 @@ public class ScheduleInfoActivity extends AppCompatActivity implements Navigatio
switch (item.getItemId()) {
case R.id.nav_my_info:
intent = new Intent(this, AccountActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedule:
intent = new Intent(this, CitizenListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_check_schedules:
if(caller != Utils.SCHEDULES_ACTIVITY){
intent = new Intent(this, SchedulesActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
break;
case R.id.nav_dependants:
intent = new Intent(this, DependentsListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedules_history:
intent = new Intent(this, SchedulesHistoryActivity.class);
startActivity(intent);
if(caller != Utils.HISTORY_ACTIVITY) {
intent = new Intent(this, SchedulesHistoryActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
break;
default:
......
......@@ -14,7 +14,6 @@ import android.support.v7.app.AppCompatActivity;
import android.support.v7.view.menu.MenuBuilder;
import android.support.v7.widget.ActionMenuView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
......@@ -118,18 +117,7 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
final DrawerLayout drawer;
ActionMenuView actionMenuView = (ActionMenuView) toolbar.findViewById(R.id.agendador_toolbar_menu);
menuBuilder = (MenuBuilder) actionMenuView.getMenu();
//noinspection RestrictedApi
menuBuilder.setCallback(new MenuBuilder.Callback() {
@Override
public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
return onOptionsItemSelected(item);
}
@Override
public void onMenuModeChange(MenuBuilder menu) {
}
});
ImageView drawerHamburger = (ImageView) toolbar.findViewById(R.id.img_toolbar_hamburger);
......@@ -187,7 +175,7 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
tv_day_month = (TextView) v.findViewById(R.id.tv_schedules_calendar_day_month);
mcv = (MaterialCalendarView) ll_fields.findViewById(R.id.ll_schedules_calendar).findViewById(R.id.mcv_schedules_date);
mcv = (MaterialCalendarView) ll_fields.findViewById(R.id.mcv_schedules_date);
mcv.setOnDateChangedListener(this);
......@@ -200,8 +188,10 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
String s = calendar.get(Calendar.YEAR) + "";
tv_year.setText(s);
tv_day_month.setText(days_short[calendar.get(Calendar.DAY_OF_WEEK) - 1] + ", " +
months_short[calendar.get(Calendar.MONTH)] + " " + calendar.get(Calendar.DAY_OF_MONTH));
String selectedDate = getResources().getString(R.string.calendar_header_basic, days_short[calendar.get(Calendar.DAY_OF_WEEK) - 1],
months_short[calendar.get(Calendar.MONTH)], calendar.get(Calendar.DAY_OF_MONTH) + "");
tv_day_month.setText(selectedDate);
//end of calendar setup
......@@ -271,7 +261,7 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
for (CheckSchedules.DependentSchedules dependentSchedules : schedules.getDependentSchedulesList()) {
for (CheckSchedules.Schedule schedule : dependentSchedules.getScheduleList()){
for (CheckSchedules.Schedule schedule : dependentSchedules.getSchedulesList()){
date = dateFormat.format(schedule.getStartTime());
if(schedule.getStartTime().after(maxDate)){
maxDate = schedule.getStartTime();
......@@ -304,20 +294,24 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
switch (item.getItemId()) {
case R.id.nav_my_info:
intent = new Intent(this, AccountActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedule:
intent = new Intent(this, CitizenListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_check_schedules:
break;
case R.id.nav_dependants:
intent = new Intent(this, DependentsListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
case R.id.nav_schedules_history:
intent = new Intent(this, SchedulesHistoryActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
break;
default:
......@@ -418,8 +412,8 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
}
for (int i = 0; i < schedules.getDependentSchedulesList().size() && id == 0; ++i){
for(int j = 0; j < schedules.getDependentSchedulesList().get(i).getScheduleList().size() && id == 0; ++j){
if(schedules.getDependentSchedulesList().get(i).getScheduleList().get(j).getId() == selectedSchedule.getId())
for(int j = 0; j < schedules.getDependentSchedulesList().get(i).getSchedulesList().size() && id == 0; ++j){
if(schedules.getDependentSchedulesList().get(i).getSchedulesList().get(j).getId() == selectedSchedule.getId())
{
id = schedules.getDependentSchedulesList().get(i).getId();
name = schedules.getDependentSchedulesList().get(i).getName();
......@@ -434,6 +428,7 @@ public class SchedulesActivity extends AppCompatActivity implements NavigationVi
bundle.putLong(Utils.ID, id);
bundle.putParcelable(Utils.SCHEDULE, selectedSchedule);
intent.putExtra(Utils.SCHEDULE_BUNDLE, bundle);
bundle.putInt(Utils.CALLER_ACTIVITY, Utils.SCHEDULES_ACTIVITY);
blockCalendar(false);
setProgressBar(false);
startActivity(intent);
......
......@@ -21,7 +21,10 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import br.ufpr.c3sl.agendador.agendador.models.UserOutput;
......@@ -96,6 +99,14 @@ public abstract class Utils {
public static final String CPF_MASK = "###.###.###-##";
public static final String BIRTH_DAY_MASK = "##/##/####";
public static final String SCHEDULE = "schedule";
public static final String DATE_FORMAT = "MM/dd/yyyy HH:mm";
public static final String CALLER_ACTIVITY = "from_activity";
public static final int HISTORY_ACTIVITY = 1;
public static final int SCHEDULES_ACTIVITY = 0;
public static final String REQUEST_FILTER_SECTOR = "q[sector_id]";
public static final String REQUEST_FILTER_TYPE = "q[service_type_id]";
public static final String REQUEST_FILTER_PLACE = "q[service_place_id]";
public static final String REQUEST_FILTER_SITUATION = "q[situation_id]";
public static int getPixelValue(int dp, Context context) {
Resources resources = context.getResources();
......@@ -164,4 +175,5 @@ public abstract class Utils {
}
}
package br.ufpr.c3sl.agendador.agendador.helpers.adapters;
import android.content.Context;
import android.graphics.Typeface;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.TextView;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import br.ufpr.c3sl.agendador.agendador.R;
import br.ufpr.c3sl.agendador.agendador.helpers.Utils;
import br.ufpr.c3sl.agendador.agendador.models.CheckSchedules;
/**
* Created by Lucas B. Cunha on 16/10/17.
* Based on https://www.journaldev.com/12478/android-searchview-example-tutorial
*/
public class SchedulesExpandableListAdapter extends BaseExpandableListAdapter {
private Context context;
private List<Pair<String, Long>> expandableListTitle;
private HashMap<String, List<CheckSchedules.Schedule>> expandableListDetail;
private DateFormat dateFormat;
public SchedulesExpandableListAdapter(Context context, List<Pair<String, Long>> expandableListTitle,
HashMap<String, List<CheckSchedules.Schedule>> expandableListDetail) {
this.context = context;
this.expandableListTitle = expandableListTitle;
this.expandableListDetail = expandableListDetail;
dateFormat = new SimpleDateFormat(Utils.DATE_FORMAT, Locale.getDefault());
}
@Override
public Object getChild(int listPosition, int expandedListPosition) {
return this.expandableListDetail.get(this.expandableListTitle.get(listPosition).first)
.get(expandedListPosition);
}
@Override
public long getChildId(int listPosition, int expandedListPosition) {
return this.expandableListDetail.get(this.expandableListTitle.get(listPosition).first)
.get(expandedListPosition).getId();
}
@Override
public View getChildView(int listPosition, final int expandedListPosition,
boolean isLastChild, View convertView, ViewGroup parent) {
final CheckSchedules.Schedule schedule = (CheckSchedules.Schedule) getChild(listPosition, expandedListPosition);
final String type = schedule.getServiceTypeName();
final String date = dateFormat.format(schedule.getStartTime());
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) this.context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.expandable_list_item, null);
}
TextView expandedListTextViewDate = (TextView) convertView
.findViewById(R.id.expandedListItem_date_content);
TextView expandedListTextViewType = (TextView) convertView.findViewById(R.id.expandedListItem_type_content);
expandedListTextViewType.setText(type);
expandedListTextViewDate.setText(date);
return convertView;
}
@Override
public int getChildrenCount(int listPosition) {
return this.expandableListDetail.get(this.expandableListTitle.get(listPosition).first)
.size();
}
@Override
public Object getGroup(int listPosition) {
return this.expandableListTitle.get(listPosition).first;
}
@Override
public int getGroupCount() {
return this.expandableListTitle.size();
}
@Override
public long getGroupId(int listPosition) {
return expandableListTitle.get(listPosition).second;
}
@Override
public View getGroupView(int listPosition, boolean isExpanded,
View convertView, ViewGroup parent) {
String listTitle = (String) getGroup(listPosition);
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) this.context.
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.expandable_list_group, null);
}
TextView listTitleTextView = (TextView) convertView
.findViewById(R.id.listTitle);
listTitleTextView.setText(listTitle);
if(expandableListDetail.get(listTitle).size() > 0){
listTitleTextView.setTypeface(null, Typeface.BOLD);
}
return convertView;
}
@Override
public boolean hasStableIds() {
return true;
}
@Override
public boolean isChildSelectable(int listPosition, int expandedListPosition) {
return true;
}
}
package br.ufpr.c3sl.agendador.agendador.helpers.listeners;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
......@@ -13,7 +12,7 @@ import java.util.List;
import br.ufpr.c3sl.agendador.agendador.helpers.Utils;
import br.ufpr.c3sl.agendador.agendador.helpers.decorators.NotAvailableDecorator;
import br.ufpr.c3sl.agendador.agendador.helpers.decorators.SchedulesDecorator;
import br.ufpr.c3sl.agendador.agendador.models.ServiceLocation;
import br.ufpr.c3sl.agendador.agendador.models.ServicePlace;
/**
* Created by Lucas B. Cunha on 05/07/17.
......@@ -23,7 +22,7 @@ public class LocationSpinnerListener implements AdapterView.OnItemSelectedListen
private boolean userSelect;
private List<ServiceLocation> serviceLocations;
private List<ServicePlace> servicePlaces;
private SchedulesDecorator schedulesDecorator;
......@@ -49,17 +48,16 @@ public class LocationSpinnerListener implements AdapterView.OnItemSelectedListen
@Override
public boolean onTouch(View v, MotionEvent event) {
userSelect = true;
Log.v("Array out of Bounds bug", "Clicou no spinner de locais");
return false;
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
if (userSelect && serviceLocations != null && serviceLocations.size() > 0 ) {
if (userSelect && servicePlaces != null && servicePlaces.size() > 0 ) {
mcv.setSelectionMode(MaterialCalendarView.SELECTION_MODE_SINGLE);
//if the position is the hint.
if(pos == serviceLocations.size()){
if(pos == servicePlaces.size()){
schedulesDecorator.setScheduleType(SchedulesDecorator.INVALID_STATE);
notAvailableDecorator.setScheduleType(NotAvailableDecorator.INVALID_STATE);
}
......@@ -72,7 +70,6 @@ public class LocationSpinnerListener implements AdapterView.OnItemSelectedListen
Utils.updateCalendarHeaderDate(mcv, tv_calendarHeaderYear, tv_calendarHeaderDayHour, days_short, months_short, null);
}
userSelect = false;
Log.v("Array out of Bounds bug", "Selecionou o item "+ pos +" do spinner de locais");
}
@Override
......@@ -80,8 +77,8 @@ public class LocationSpinnerListener implements AdapterView.OnItemSelectedListen
}
public void setServiceLocations(List<ServiceLocation> serviceLocations) {
this.serviceLocations = serviceLocations;
public void setServicePlaces(List<ServicePlace> servicePlaces) {
this.servicePlaces = servicePlaces;
}
......
package br.ufpr.c3sl.agendador.agendador.helpers.listeners;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
......@@ -54,7 +53,6 @@ public class SectorSpinnerListener implements AdapterView.OnItemSelectedListener
@Override
public boolean onTouch(View v, MotionEvent event) {
userSelect = true;
Log.v("Array out of Bounds bug", "Clicou no spinner de setores");
return false;
}
......@@ -76,7 +74,6 @@ public class SectorSpinnerListener implements AdapterView.OnItemSelectedListener
}
userSelect = false;
Log.v("Array out of Bounds bug", "Selecionou o item "+ pos + " do spinner de setores");
}
@Override
......
......@@ -53,14 +53,13 @@ public class ServiceTypeSpinnerListener implements AdapterView.OnItemSelectedLis
@Override
public boolean onTouch(View v, MotionEvent event) {
userSelect = true;
Log.v("Array out of Bounds bug", "Clicou no spinner de tipos de serviço");
return false;
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
if (userSelect && serviceTypes != null && serviceTypes.size() > 0 ) {
presenter.requestAvailableSchedules(serviceTypes.get(pos).getmId());
presenter.requestAvailableSchedules(serviceTypes.get(pos).getId());
Utils.updateCalendarHeaderDate(mcv, tv_calendarHeaderYear, tv_calendarHeaderDayHour, days_short, months_short, null);
......
package br.ufpr.c3sl.agendador.agendador.helpers.listeners.schedulesHistory;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AdapterView;
import br.ufpr.c3sl.agendador.agendador.views.SchedulesHistoryView;
/**
* Created by Lucas B. Cunha on 30/10/17.
*/
public class FilterListener implements AdapterView.OnItemSelectedListener, View.OnTouchListener {
private boolean userSelect;
private SchedulesHistoryView activity;
public FilterListener(SchedulesHistoryView activity) {
this.activity = activity;
this.userSelect = false;
}
@Override
public boolean onTouch(View v, MotionEvent event) {
userSelect = true;
return false;
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if(userSelect){
userSelect = false;
activity.updateSpinners(parent.getId());
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
}
......@@ -95,7 +95,6 @@ public class CheckSchedules {
dest.writeString(situation);
}
/**reads back fields IN THE ORDER they were written */
private Schedule(Parcel pc){
id = pc.readLong();
......@@ -108,6 +107,7 @@ public class CheckSchedules {
situation = pc.readString();
}
/** Static field used to regenerate object, individually or as arrays */
public static final Parcelable.Creator<Schedule> CREATOR = new Parcelable.Creator<Schedule>() {
public Schedule createFromParcel(Parcel pc) {
......@@ -118,12 +118,16 @@ public class CheckSchedules {
}
};
@Override
public int describeContents() {
return 0;
}
public String getSituation() {
return situation;
}
public long getId() {
return id;
}
......@@ -159,10 +163,10 @@ public class CheckSchedules {
String name;
@SerializedName("schedules")