Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distinguish the tapped marker from other markers; #1722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dust27149
Copy link

A low-cost solution to distinguish the tapped marker from other markers with the help of onSingleTapUp & onSingleTapConfirmed method and drawable resources.

Disadvantages: you may need to add many drawable resources

Usage:

Step1.

add drawable resources that can distinguish status from focused and other status;
marker_with_status.xml
<item android:drawable="@drawable/marker_default" android:state_focused="true" /> <item android:drawable="@drawable/marker_default_focused_base" />

Step2.

call setIcon(Drawable icon) method;

Marker marker = new Marker(map); marker.setIcon(ContextCompat.getDrawable(this,R.drawable.marker_with_status));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant