-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android] Unbound elevation logic from simple place page controller t…
…o make it reusable for another bottom sheet (e.g. guides layer)
- Loading branch information
1 parent
a83e089
commit eadfe70
Showing
8 changed files
with
52 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 20 additions & 1 deletion
21
android/src/com/mapswithme/maps/widget/placepage/PlacePageFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
package com.mapswithme.maps.widget.placepage; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
import com.mapswithme.maps.R; | ||
import com.mapswithme.maps.purchase.AdsRemovalPurchaseControllerProvider; | ||
|
||
public class PlacePageFactory | ||
{ | ||
@NonNull | ||
public static PlacePageController createPlacePageController( | ||
public static PlacePageController createCompositePlacePageController( | ||
@NonNull AdsRemovalPurchaseControllerProvider provider, | ||
@NonNull PlacePageController.SlideListener slideListener, | ||
@NonNull RoutingModeListener routingModeListener) | ||
{ | ||
return new PlacePageControllerComposite(provider, slideListener, routingModeListener); | ||
} | ||
|
||
@NonNull | ||
static PlacePageController createRichPlacePageController( | ||
@NonNull AdsRemovalPurchaseControllerProvider provider, | ||
@NonNull PlacePageController.SlideListener listener, | ||
@Nullable RoutingModeListener routingModeListener) | ||
{ | ||
return new RichPlacePageController(provider, listener, routingModeListener); | ||
} | ||
|
||
@NonNull | ||
static PlacePageController createElevationProfilePlacePageController( | ||
@NonNull PlacePageController.SlideListener listener) | ||
{ | ||
ElevationProfileViewRenderer renderer = new ElevationProfileViewRenderer(); | ||
return new SimplePlacePageController(R.id.elevation_profile, renderer, renderer, listener); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters