Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Expose attribution manager as public API #10942

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jan 17, 2018

Closes #10932, this PR allows the Android SDK to have parity with the iOS SDK in terms of showing the attribution dialog on demand. On top of this, custom instances of AttributionDialogManager can be created and hooked into the attribution click with:

findViewById(R.id.attributionView).setOnClickListener(yourAwesomeAttribtionManager);

This allows to override the protected showAttributionDialog and provide a custom implementation.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jan 17, 2018
@tobrun tobrun added this to the android-v6.0.0 milestone Jan 17, 2018
@tobrun tobrun self-assigned this Jan 17, 2018
@tobrun tobrun requested a review from LukasPaczos January 17, 2018 09:37
Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to expose it even further by adding a setter in the UiSettings?

@tobrun tobrun force-pushed the 10932-expose-attribution-manager branch from ac829fc to 39ef624 Compare January 17, 2018 13:54
@tobrun
Copy link
Member Author

tobrun commented Jan 17, 2018

@LukasPaczos what kind of API do you have in mind for that?

@LukasPaczos
Copy link
Contributor

@tobrun I was thinking about UiSettings#setAttributionDialogManager(AttributionDialogManager myAttributionDialogManager), or just UiSettings#setOnAttributionDialogShownListener(). To give better idea how to handle this situation without digging through layout files.

@tobrun
Copy link
Member Author

tobrun commented Jan 18, 2018

@LukasPaczos I added the suggested API in 78714e3. Care to re-review?

@LukasPaczos
Copy link
Contributor

@tobrun thanks for including the setter. 🚢

@tobrun tobrun merged commit c404e3b into master Jan 18, 2018
@tobrun tobrun deleted the 10932-expose-attribution-manager branch January 18, 2018 13:12
@tobrun tobrun mentioned this pull request Jan 26, 2018
23 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants