forked from organicmaps/organicmaps
[android] Disabled logic and button of "order a taxi"
Signed-off-by: Altynaika <altynaika.toktomuratovaa@gmail.com>
This commit is contained in:
parent
5b6c2cf152
commit
05a98d3725
4 changed files with 44 additions and 44 deletions
|
@ -94,7 +94,7 @@
|
|||
android:layout_height="@dimen/divider_height"
|
||||
layout="@layout/divider_horizontal"/>
|
||||
|
||||
<include android:visibility="gone" layout="@layout/place_page_taxi"/>
|
||||
<!-- <include android:visibility="gone" layout="@layout/place_page_taxi"/>-->
|
||||
|
||||
<include android:visibility="gone" layout="@layout/place_page_ugc"/>
|
||||
|
||||
|
|
|
@ -459,9 +459,9 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
mTvEntrance = mEntrance.findViewById(R.id.tv__place_entrance);
|
||||
mTaxiShadow = findViewById(R.id.place_page_taxi_shadow);
|
||||
mTaxiDivider = findViewById(R.id.place_page_taxi_divider);
|
||||
mTaxi = findViewById(R.id.ll__place_page_taxi);
|
||||
TextView orderTaxi = mTaxi.findViewById(R.id.tv__place_page_order_taxi);
|
||||
orderTaxi.setOnClickListener(this);
|
||||
// mTaxi = findViewById(R.id.ll__place_page_taxi);
|
||||
// TextView orderTaxi = mTaxi.findViewById(R.id.tv__place_page_order_taxi);
|
||||
// orderTaxi.setOnClickListener(this);
|
||||
mEditPlace = findViewById(R.id.ll__place_editor);
|
||||
mEditPlace.setOnClickListener(this);
|
||||
mAddOrganisation = findViewById(R.id.ll__add_organisation);
|
||||
|
@ -1427,7 +1427,7 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
UiUtils.showIf(mapObject.hasMetadata(), mKeyInfo);
|
||||
refreshOpeningHours(mapObject);
|
||||
|
||||
showTaxiOffer(mapObject);
|
||||
// showTaxiOffer(mapObject);
|
||||
|
||||
if (RoutingController.get().isNavigating() || RoutingController.get().isPlanning())
|
||||
{
|
||||
|
@ -1470,26 +1470,26 @@ public class PlacePageView extends NestedScrollViewClickFixed
|
|||
hideHotelDetailViews();
|
||||
}
|
||||
|
||||
private void showTaxiOffer(@NonNull MapObject mapObject)
|
||||
{
|
||||
List<TaxiType> taxiTypes = mapObject.getReachableByTaxiTypes();
|
||||
|
||||
boolean showTaxiOffer = taxiTypes != null && !taxiTypes.isEmpty() &&
|
||||
LocationHelper.INSTANCE.getMyPosition() != null &&
|
||||
ConnectionState.INSTANCE.isConnected()
|
||||
&& mapObject.getRoadWarningMarkType() == RoadWarningMarkType.UNKNOWN;
|
||||
UiUtils.showIf(showTaxiOffer, mTaxi, mTaxiShadow, mTaxiDivider);
|
||||
|
||||
if (!showTaxiOffer)
|
||||
return;
|
||||
|
||||
// At this moment we display only a one taxi provider at the same time.
|
||||
TaxiType type = taxiTypes.get(0);
|
||||
ImageView logo = mTaxi.findViewById(R.id.iv__place_page_taxi);
|
||||
logo.setImageResource(type.getIcon());
|
||||
TextView title = mTaxi.findViewById(R.id.tv__place_page_taxi);
|
||||
title.setText(type.getTitle());
|
||||
}
|
||||
// private void showTaxiOffer(@NonNull MapObject mapObject)
|
||||
// {
|
||||
// List<TaxiType> taxiTypes = mapObject.getReachableByTaxiTypes();
|
||||
//
|
||||
// boolean showTaxiOffer = taxiTypes != null && !taxiTypes.isEmpty() &&
|
||||
// LocationHelper.INSTANCE.getMyPosition() != null &&
|
||||
// ConnectionState.INSTANCE.isConnected()
|
||||
// && mapObject.getRoadWarningMarkType() == RoadWarningMarkType.UNKNOWN;
|
||||
// UiUtils.showIf(showTaxiOffer, mTaxi, mTaxiShadow, mTaxiDivider);
|
||||
//
|
||||
// if (!showTaxiOffer)
|
||||
// return;
|
||||
//
|
||||
// // At this moment we display only a one taxi provider at the same time.
|
||||
// TaxiType type = taxiTypes.get(0);
|
||||
// ImageView logo = mTaxi.findViewById(R.id.iv__place_page_taxi);
|
||||
// logo.setImageResource(type.getIcon());
|
||||
// TextView title = mTaxi.findViewById(R.id.tv__place_page_taxi);
|
||||
// title.setText(type.getTitle());
|
||||
// }
|
||||
|
||||
private void hideHotelDetailViews()
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ public class RichPlacePageController implements PlacePageController, LocationLis
|
|||
public void onSheetSliding(int top)
|
||||
{
|
||||
mSlideListener.onPlacePageSlide(top);
|
||||
mPlacePageTracker.onMove();
|
||||
// mPlacePageTracker.onMove();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,8 +33,8 @@ public class PlacePageTracker implements Savable<Bundle>
|
|||
private final PlacePageView mPlacePageView;
|
||||
@NonNull
|
||||
private final View mBottomButtons;
|
||||
@NonNull
|
||||
private final View mTaxi;
|
||||
// @NonNull
|
||||
// private final View mTaxi;
|
||||
@Nullable
|
||||
private MapObject mMapObject;
|
||||
private boolean mTaxiTracked;
|
||||
|
@ -47,7 +47,7 @@ public class PlacePageTracker implements Savable<Bundle>
|
|||
{
|
||||
mPlacePageView = placePageView;
|
||||
mBottomButtons = bottomButtons;
|
||||
mTaxi = mPlacePageView.findViewById(R.id.ll__place_page_taxi);
|
||||
// mTaxi = mPlacePageView.findViewById(R.id.ll__place_page_taxi);
|
||||
}
|
||||
|
||||
public void setMapObject(@Nullable MapObject mapObject)
|
||||
|
@ -57,7 +57,7 @@ public class PlacePageTracker implements Savable<Bundle>
|
|||
|
||||
public void onMove()
|
||||
{
|
||||
trackTaxiVisibility();
|
||||
// trackTaxiVisibility();
|
||||
}
|
||||
|
||||
public void onHidden()
|
||||
|
@ -107,20 +107,20 @@ public class PlacePageTracker implements Savable<Bundle>
|
|||
}
|
||||
}
|
||||
|
||||
private void trackTaxiVisibility()
|
||||
{
|
||||
if (!mTaxiTracked && isViewOnScreen(mTaxi, VISIBILITY_RATIO_TAXI) && mMapObject != null)
|
||||
{
|
||||
List<TaxiType> taxiTypes = mMapObject.getReachableByTaxiTypes();
|
||||
if (taxiTypes != null && !taxiTypes.isEmpty())
|
||||
{
|
||||
String providerName = taxiTypes.get(0).getProviderName();
|
||||
Statistics.INSTANCE.trackTaxiEvent(Statistics.EventName.ROUTING_TAXI_SHOW,
|
||||
providerName);
|
||||
mTaxiTracked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// private void trackTaxiVisibility()
|
||||
// {
|
||||
// if (!mTaxiTracked && isViewOnScreen(mTaxi, VISIBILITY_RATIO_TAXI) && mMapObject != null)
|
||||
// {
|
||||
// List<TaxiType> taxiTypes = mMapObject.getReachableByTaxiTypes();
|
||||
// if (taxiTypes != null && !taxiTypes.isEmpty())
|
||||
// {
|
||||
// String providerName = taxiTypes.get(0).getProviderName();
|
||||
// Statistics.INSTANCE.trackTaxiEvent(Statistics.EventName.ROUTING_TAXI_SHOW,
|
||||
// providerName);
|
||||
// mTaxiTracked = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue