forked from organicmaps/organicmaps-tmp
[android] Fixed review notes
https://github.com/mapsme/omim/pull/12807#discussion_r398362687 https://github.com/mapsme/omim/pull/12807#discussion_r398367314 https://github.com/mapsme/omim/pull/12807#discussion_r398370270
This commit is contained in:
parent
8489050647
commit
85ddb75fe5
2 changed files with 12 additions and 6 deletions
|
@ -161,10 +161,10 @@
|
|||
android:layout_marginEnd="@dimen/margin_base"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:id="@+id/difficulty_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/difficulty_container"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -199,6 +199,7 @@
|
|||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@+id/medium_divider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="@dimen/margin_base"
|
||||
|
|
|
@ -52,6 +52,9 @@ public class ElevationProfileViewRenderer implements PlacePageViewRenderer<Place
|
|||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
private View mTimeContainer;
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
private View mMediumDivider;
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
|
@ -84,12 +87,13 @@ public class ElevationProfileViewRenderer implements PlacePageViewRenderer<Place
|
|||
mDescent = view.findViewById(R.id.descent);
|
||||
mMaxAltitude = view.findViewById(R.id.max_altitude);
|
||||
mMinAltitude = view.findViewById(R.id.min_altitude);
|
||||
mTime = view.findViewById(R.id.time);
|
||||
mDifficultyLevels[0] = view.findViewById(R.id.difficulty_level_1);
|
||||
mDifficultyLevels[1] = view.findViewById(R.id.difficulty_level_2);
|
||||
mDifficultyLevels[2] = view.findViewById(R.id.difficulty_level_3);
|
||||
mDifficultyContainer = view.findViewById(R.id.difficulty_container);
|
||||
mTimeContainer = view.findViewById(R.id.time_container);
|
||||
mTime = mTimeContainer.findViewById(R.id.time);
|
||||
mDifficultyContainer = view.findViewById(R.id.difficulty_container);
|
||||
mDifficultyLevels[0] = mDifficultyContainer.findViewById(R.id.difficulty_level_1);
|
||||
mDifficultyLevels[1] = mDifficultyContainer.findViewById(R.id.difficulty_level_2);
|
||||
mDifficultyLevels[2] = mDifficultyContainer.findViewById(R.id.difficulty_level_3);
|
||||
mMediumDivider = view.findViewById(R.id.medium_divider);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -105,6 +109,7 @@ public class ElevationProfileViewRenderer implements PlacePageViewRenderer<Place
|
|||
|
||||
boolean invalidDifficulty = level > MAX_DIFFICULTY_LEVEL;
|
||||
UiUtils.hideIf(invalidDifficulty, mDifficultyContainer);
|
||||
UiUtils.hideIf(invalidDifficulty, mMediumDivider);
|
||||
|
||||
if (invalidDifficulty)
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue