Skip to content

Commit

Permalink
Merge pull request #2 from MaximeCrp/test-print-date
Browse files Browse the repository at this point in the history
fix: change date print for humans
  • Loading branch information
MaximeCrp authored Dec 1, 2018
2 parents e9a561c + 7a02e87 commit 8f3d085
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
Context context = getContext();

title.setText(event.getTitle());
date.setText(event.getTimetable());
String text="";
for(int i=0 ; i<event.getDate().length ; i++) {
text+= event.getDate()[i][0] + "\n" + event.getDate()[i][1] + "\n";
}
date.setText(text);
placename.setText(event.getPlacename());
address.setText(event.getAddress());
Picasso.with(context).load("http://jackjack.fr/wp-content/uploads/2017/04/bandeau_programmation.jpg").into(image);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class Event implements Serializable, ClusterItem {
private ArrayList<Double> latlon = new ArrayList<Double>();



Event() {}

@Override
Expand All @@ -45,6 +46,11 @@ public String getTimetable() {
return timetable;
}

public void setTimetable(String timetable) {
this.timetable = timetable;
putDate(timetable);
}

public String getAddress() {
return address;
}
Expand Down Expand Up @@ -95,6 +101,7 @@ 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++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void onBindViewHolder(@NonNull EventViewHolder holder, int position) {
holder.txvName.setText(eventToDisplay.getTitle());
String text="";
for(int i=0 ; i<eventToDisplay.getDate().length ; i++) {
text+= eventToDisplay.getDate()[i][0] + " - " + eventToDisplay.getDate()[i][1] + "\n";
text += "Début : " + eventToDisplay.getDate()[i][0] + "\nFin : " + eventToDisplay.getDate()[i][1] + "\n";
}
holder.txvDate.setText(text);

Expand Down

0 comments on commit 8f3d085

Please sign in to comment.