diff --git a/Samva/app/src/main/java/com/example/utilisateur/samva/Event.java b/Samva/app/src/main/java/com/example/utilisateur/samva/Event.java index 132bc80..1d4df71 100644 --- a/Samva/app/src/main/java/com/example/utilisateur/samva/Event.java +++ b/Samva/app/src/main/java/com/example/utilisateur/samva/Event.java @@ -45,21 +45,6 @@ public String getTimetable() { return timetable; } - public void setTimetable(String timetable) { - this.timetable = timetable; - putDate(timetable); - - - /* - String[] enter = timetable.split(";"); - for (int i = 0; i < enter.length; i++) { - String[] date = enter[i].split(" "); - this.date[i][0] = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").parse(date[0]); - this.date[i][1] = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").parse(date[1]); - }*/ - - } - public String getAddress() { return address; } @@ -110,7 +95,6 @@ public void putDate(String timetable){ else { enter[0] = timetable; } - String[][] enter2 = new String[enter.length][2]; this.date = new String[enter.length][2]; for (int i = 0; i < enter.length; i++) { diff --git a/Samva/app/src/main/java/com/example/utilisateur/samva/MainActivity.java b/Samva/app/src/main/java/com/example/utilisateur/samva/MainActivity.java index 90d114a..48d1347 100644 --- a/Samva/app/src/main/java/com/example/utilisateur/samva/MainActivity.java +++ b/Samva/app/src/main/java/com/example/utilisateur/samva/MainActivity.java @@ -7,12 +7,9 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.TabLayout; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; import android.support.v4.content.ContextCompat; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.RecyclerView; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.Toast; @@ -27,21 +24,11 @@ import java.util.ArrayList; import java.util.List; -import retrofit2.Retrofit; - public class MainActivity extends AppCompatActivity implements MainActivityCallback, TabLayout.OnTabSelectedListener{ - private Retrofit retrofit; - private RecyclerView rcvEvents; - private EventAdapter eventsAdapter; private ArrayList events = new ArrayList<>(); private List eventbis; - FragmentManager fragmentManager; - FragmentTransaction fragmentTransaction; - MapsFragment mapsFragment; - ListFragment listFragment; - private TabLayout tabLayout; private StatePagerAdapterFragment statePagerAdapterFragment; private ViewPager viewPager; @@ -77,24 +64,6 @@ public void onCancelled(@NonNull DatabaseError databaseError) { }); } - public void createFragment() { - - Context context = getApplicationContext(); - fragmentManager = getSupportFragmentManager(); - fragmentTransaction = fragmentManager.beginTransaction(); - mapsFragment = new MapsFragment(); - listFragment = new ListFragment(); - - Bundle bundleEvents = new Bundle(); - bundleEvents.putSerializable("EVENTS_LIST", this.events); - listFragment.setArguments(bundleEvents); - - - //fragmentTransaction.add(R.id.container, mapsFragment); - fragmentTransaction.add(R.id.container, listFragment); - fragmentTransaction.commit(); - - } public void details(Event event) { Intent intent = new Intent(this, EventActivity.class); diff --git a/Samva/app/src/main/java/com/example/utilisateur/samva/MapsFragment.java b/Samva/app/src/main/java/com/example/utilisateur/samva/MapsFragment.java index 8d4235f..6e1b35e 100644 --- a/Samva/app/src/main/java/com/example/utilisateur/samva/MapsFragment.java +++ b/Samva/app/src/main/java/com/example/utilisateur/samva/MapsFragment.java @@ -13,7 +13,6 @@ import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.View; -import android.content.Context; import android.view.LayoutInflater; import android.view.ViewGroup; @@ -26,7 +25,6 @@ public class MapsFragment extends Fragment implements GoogleMap.OnMarkerClickLis View rootView; private GoogleMap gMap; - Context context = getContext(); private SupportMapFragment mSupportMapFragment; ArrayList eventList; diff --git a/Samva/app/src/main/java/com/example/utilisateur/samva/RecyclerItemClickListener.java b/Samva/app/src/main/java/com/example/utilisateur/samva/RecyclerItemClickListener.java index 886f330..25f4ce0 100644 --- a/Samva/app/src/main/java/com/example/utilisateur/samva/RecyclerItemClickListener.java +++ b/Samva/app/src/main/java/com/example/utilisateur/samva/RecyclerItemClickListener.java @@ -16,7 +16,7 @@ public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListen public interface OnItemClickListener { - public void onItemClick(View view, int position); + void onItemClick(View view, int position); } public RecyclerItemClickListener(Context context, OnItemClickListener listener) { diff --git a/Samva/app/src/main/java/com/example/utilisateur/samva/Travel.java b/Samva/app/src/main/java/com/example/utilisateur/samva/Travel.java index f0db4bd..500c4b7 100644 --- a/Samva/app/src/main/java/com/example/utilisateur/samva/Travel.java +++ b/Samva/app/src/main/java/com/example/utilisateur/samva/Travel.java @@ -52,7 +52,6 @@ public int getNbPlaces() { public void setNbPlaces(int nbPlaces) { this.nbPlaces = nbPlaces; - //passengers = new ArrayList(nbPlaces); } public String getDepartPlace() {