Add icon to bottom sheet details

This commit is contained in:
neslihanturan 2017-12-13 20:20:38 +03:00 committed by maskara
parent 6b2596bced
commit 00ad5a7a71
3 changed files with 10 additions and 1 deletions

View file

@ -316,6 +316,8 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
checkGps();
}
/**
* This method should be the single point to load/refresh nearby places
*

View file

@ -15,6 +15,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.gson.Gson;
@ -55,6 +56,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
private TextView description;
private TextView title;
private TextView distance;
private ImageView icon;
private boolean isFabOpen=false;
@ -154,6 +156,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
description = getActivity().findViewById(R.id.description);
title = getActivity().findViewById(R.id.title);
distance = getActivity().findViewById(R.id.category);
icon = getActivity().findViewById(R.id.icon);
}
private void setListeners() {
@ -334,7 +337,9 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
}
private void passInfoToSheet(Place place) {
description.setText(place.getDescription().toString());
//TODO set correct icon here
icon.setImageResource(place.getDescription().getIcon());
description.setText(place.getDescription().getText());
title.setText(place.name.toString());
distance.setText(place.distance.toString());
}

View file

@ -53,6 +53,8 @@
app:pressedTranslationZ="12dp"
android:backgroundTint="@color/cardview_light_background"
android:clickable="true"
app:srcCompat="@drawable/ic_list_white_24dp"
android:scaleType="center"
/>
<View
android:layout_width="match_parent"