forked from upstream-mirrors/OpenTracks
Set photo size first in the maker list
This commit is contained in:
@@ -77,12 +77,14 @@ public class ListItemUtils {
|
|||||||
textGradient.setVisibility(hasPhoto ? View.VISIBLE : View.GONE);
|
textGradient.setVisibility(hasPhoto ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
if (hasPhoto) {
|
if (hasPhoto) {
|
||||||
|
int photoHeight = getPhotoHeight(activity);
|
||||||
|
photo.getLayoutParams().height = photoHeight;
|
||||||
photo.setImageResource(android.R.color.transparent);
|
photo.setImageResource(android.R.color.transparent);
|
||||||
Display defaultDisplay = activity.getWindowManager().getDefaultDisplay();
|
Display defaultDisplay = activity.getWindowManager().getDefaultDisplay();
|
||||||
PhotoUtils.setImageVew(
|
PhotoUtils.setImageVew(
|
||||||
photo, Uri.parse(photoUrl), defaultDisplay.getWidth(), getPhotoHeight(activity), false);
|
photo, Uri.parse(photoUrl), defaultDisplay.getWidth(), photoHeight, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set icon
|
// Set icon
|
||||||
if (isRecording) {
|
if (isRecording) {
|
||||||
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording;
|
iconId = isPaused ? R.drawable.ic_track_paused : R.drawable.ic_track_recording;
|
||||||
|
|||||||
Reference in New Issue
Block a user