-
-
Save jdsingh/6741c8146c025a3b8f77 to your computer and use it in GitHub Desktop.
Android - adjust google map's my location button
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
//HACK: Get the button view and place it on the bottom right (as Google Maps app) | |
View locationButton = ((View) mMapFragment.getView().findViewById(1).getParent()).findViewById(2); | |
RelativeLayout.LayoutParams rlp = (RelativeLayout.LayoutParams) locationButton.getLayoutParams(); | |
rlp.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0); | |
rlp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); | |
rlp.setMargins(0, 0, 30, 30); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment