Commit 62e21c5e authored by Sajal Narang's avatar Sajal Narang

Add ScrollView in EventFragment, fix minor bugs, fix #81

parent 38eaca6a
......@@ -53,12 +53,14 @@ public class FeedAdapter extends RecyclerView.Adapter<FeedAdapter.ViewHolder> {
viewHolder.eventTitle.setText(currentEvent.getEventName());
// viewHolder.eventDetails.setText(currentEvent.getEventDescription());
Timestamp timestamp = currentEvent.getEventStartTime();
Date Date = new Date(timestamp.getTime());
SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("dd MMM");
SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat("HH:mm a");
if (timestamp != null) {
Date Date = new Date(timestamp.getTime());
SimpleDateFormat simpleDateFormatDate = new SimpleDateFormat("dd MMM");
SimpleDateFormat simpleDateFormatTime = new SimpleDateFormat("HH:mm a");
viewHolder.eventDate.setText(simpleDateFormatDate.format(Date));
viewHolder.eventTime.setText(simpleDateFormatTime.format(Date));
viewHolder.eventDate.setText(simpleDateFormatDate.format(Date));
viewHolder.eventTime.setText(simpleDateFormatTime.format(Date));
}
StringBuilder eventVenueName = new StringBuilder();
for (Venue venue : currentEvent.getEventVenues()) {
eventVenueName.append(", ").append(venue.getVenueName());
......
......@@ -134,9 +134,13 @@ public class FeedFragment extends BaseFragment {
getActivityBuffer().safely(new ActivityBuffer.IRunnable() {
@Override
public void run(Activity pActivity) {
feedRecyclerView = getActivity().findViewById(R.id.feed_recycler_view);
feedRecyclerView.setAdapter(feedAdapter);
feedRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
try {
feedRecyclerView = getActivity().findViewById(R.id.feed_recycler_view);
feedRecyclerView.setAdapter(feedAdapter);
feedRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
} catch (NullPointerException e) {
e.printStackTrace();
}
}
});
}
......
......@@ -29,8 +29,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginBottom="12dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="12dp"
android:layout_weight="3"
android:orientation="vertical">
......@@ -150,21 +150,24 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:background="#aaa">
</View>
<TextView
android:id="@+id/event_page_description"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:textColor="#777"
android:textSize="16sp" />
android:layout_height="wrap_content">
<TextView
android:id="@+id/event_page_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:textColor="#777"
android:textSize="16sp" />
</ScrollView>
</LinearLayout>
</LinearLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment