Remove opening hours divider

This commit is contained in:
PavelRatushny 2017-12-12 15:07:26 +02:00
parent 4df2f7edfe
commit 67b86905e1
2 changed files with 3 additions and 25 deletions

View file

@ -94,19 +94,13 @@
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_marginRight="@dimen/context_menu_padding_margin_small"
android:layout_marginEnd="@dimen/context_menu_padding_margin_small"
tools:text="Closed till 10:00" tools:text="Closed till 10:00"
android:id="@+id/opening_hours_text_view" android:id="@+id/opening_hours_text_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
<TextView
android:id="@+id/compass_layout_bullet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/context_menu_padding_margin_default"
android:paddingRight="@dimen/context_menu_padding_margin_default"
android:text="•"/>
<LinearLayout <LinearLayout
android:id="@+id/compass_layout" android:id="@+id/compass_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -1157,23 +1157,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
updateDistanceDirection(); updateDistanceDirection();
compassView.setVisibility(View.VISIBLE); compassView.setVisibility(View.VISIBLE);
} else { } else {
compassView.setVisibility(View.GONE); compassView.setVisibility(View.INVISIBLE);
}
updateCompassBulletVisibility();
}
}
private void updateCompassBulletVisibility() {
OsmandApplication app = getMyApplication();
if (app != null && view != null) {
View bulletView = view.findViewById(R.id.compass_layout_bullet);
Location ll = app.getLocationProvider().getLastKnownLocation();
OpeningHoursInfo openingHoursInfo = menu.getOpeningHoursInfo();
if (ll != null && menu.displayDistanceDirection() && menu.getCurrentMenuState() != MenuState.FULL_SCREEN
&& openingHoursInfo != null && openingHoursInfo.containsInfo()) {
bulletView.setVisibility(View.VISIBLE);
} else {
bulletView.setVisibility(View.GONE);
} }
} }
} }