Skip to content
This repository was archived by the owner on Feb 15, 2021. It is now read-only.

Added map icon #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,21 @@ private void setContentViewHolderAtPosition(final ContentViewHolder holder, int
}

if (!this.tag.equals(Sponsors.TAG)) {
if (numOfViewType < mCardMapEventList.size())
Glide.with(mContext)
.asDrawable()
.load(R.mipmap.map_icon_foreground)
.into(holder.mCardMapIcon);

holder.mCardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int position = holder.getAdapterPosition();

if (position < mCardMapEventList.size()) {
if (position < mCardMapEventList.size())
Glide.with(mContext)
.asBitmap()
.load(reference.child(mCardMapEventList.get(position)))
.into(holder.mCardMapEvent);
} else {
Toast.makeText(mContext, "No Map at the current moment.", Toast.LENGTH_SHORT).show();
return;
}

holder.showPopUpMapImage();
}
Expand All @@ -210,6 +211,7 @@ public class ContentViewHolder extends RecyclerView.ViewHolder {
CardView mCardView;
ImageView mCardImage;
ImageView mCardMapEvent;
ImageView mCardMapIcon;
TextView mCardTitle;
TextView mCardSideSubtitle;
TextView mCardSubtitle;
Expand All @@ -233,6 +235,11 @@ public ContentViewHolder(final View itemView) {
this.mCardMapEvent = dialog.findViewById(R.id.mapImage);
}

if (tag.equals(Workshops.TAG))
this.mCardMapIcon = itemView.findViewById(R.id.horizontal_section_card_workshop_map_icon);
else if (tag.equals(Schedule.TAG))
this.mCardMapIcon = itemView.findViewById(R.id.horizontal_section_card_schedule_map_icon);

this.mCardView = itemView.findViewById(R.id.horizontal_section_card_view);
this.mCardImage = itemView.findViewById(R.id.horizontal_section_card_image);
this.mCardTitle = itemView.findViewById(R.id.horizontal_section_card_title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Schedule extends AppCompatActivity {

private static final String ALLFILTER = "All";
private static final String FILTERTYPE = "event";
private static final String TAG = Schedule.class.getSimpleName();
public static final String TAG = Schedule.class.getSimpleName();

private ArrayList<Integer> mViewTypeList;
private ArrayList<String> mSubSectionTitleList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class Workshops extends AppCompatActivity {

private static final String ALLFILTER = "All";
private static final String FILTERTYPE = "workshop";
private static final String TAG = Workshops.class.getSimpleName();
public static final String TAG = Workshops.class.getSimpleName();

private ArrayList<Integer> mViewTypeList;
private ArrayList<String> mSubSectionTitleList;
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_splash_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_rawRes="@raw/lightblue_loadingscreen"
android:scaleX="1.5"
android:scaleY="1.5"/>
android:scaleType="centerCrop"/>

</androidx.constraintlayout.widget.ConstraintLayout>
20 changes: 19 additions & 1 deletion app/src/main/res/layout/horizontal_section_card.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand All @@ -27,7 +28,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
android:layout_centerHorizontal="true"/>

<ImageView
android:id="@+id/horizontal_section_card_schedule_map_icon"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"/>

<TextView
android:id="@+id/horizontal_section_card_title"
Expand Down Expand Up @@ -115,6 +124,15 @@
android:layout_below="@id/horizontal_section_card_body"
android:text="@string/horizontal_card_footer_dummy" />

<ImageView
android:id="@+id/horizontal_section_card_workshop_map_icon"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_below="@id/horizontal_section_card_timestamp"
android:layout_alignEnd="@+id/horizontal_section_card_side_subtitle"
android:layout_alignRight="@+id/horizontal_section_card_side_subtitle"
android:layout_marginTop="2dp" />

</RelativeLayout>
</androidx.cardview.widget.CardView>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.