Fix #5324
This commit is contained in:
parent
0cc402d89a
commit
b4bc23bc32
2 changed files with 19 additions and 1 deletions
|
@ -120,6 +120,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/additional_info_row"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height= "wrap_content"
|
||||
android:layout_marginBottom="@dimen/context_menu_direction_margin"
|
||||
|
|
|
@ -1477,6 +1477,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
additionalInfoImageView.setVisibility(showAdditionalImage ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
updateCompassVisibility();
|
||||
updateAdditionalInfoVisibility();
|
||||
}
|
||||
|
||||
private void updateCompassVisibility() {
|
||||
|
@ -1487,11 +1488,27 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
updateDistanceDirection();
|
||||
compassView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
compassView.setVisibility(View.INVISIBLE);
|
||||
compassView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateAdditionalInfoVisibility() {
|
||||
TextView line3 = (TextView) view.findViewById(R.id.context_menu_line3);
|
||||
ImageView additionalInfoImageView = (ImageView) view.findViewById(R.id.additional_info_image_view);
|
||||
TextView additionalInfoTextView = (TextView) view.findViewById(R.id.additional_info_text_view);
|
||||
View compassView = view.findViewById(R.id.compass_layout);
|
||||
|
||||
if (line3.getVisibility() == View.GONE
|
||||
&& additionalInfoImageView.getVisibility() == View.GONE
|
||||
&& additionalInfoTextView.getVisibility() == View.GONE
|
||||
&& compassView.getVisibility() == View.GONE) {
|
||||
view.findViewById(R.id.additional_info_row).setVisibility(View.GONE);
|
||||
} else {
|
||||
view.findViewById(R.id.additional_info_row).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateDistanceDirection() {
|
||||
OsmandApplication app = getMyApplication();
|
||||
FragmentActivity activity = getActivity();
|
||||
|
|
Loading…
Reference in a new issue