mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Add icon to bottom sheet details
This commit is contained in:
parent
53df3dca68
commit
81237e8267
3 changed files with 10 additions and 1 deletions
|
|
@ -307,6 +307,8 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
checkGps();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This method should be the single point to load/refresh nearby places
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
@ -332,7 +335,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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue