I see that it's possible to set margins for the UI, also it's possible to disable the button.
But can we move compass button to a different location rather then top left?
Google maps app has it in the top right corner, which made me think that it's possible.
I just had the same problem and solved it like this:
/* access compass */
ViewGroup parent = (ViewGroup) mMapView.findViewById(Integer.parseInt("1")).getParent();
View compassButton = parent.getChildAt(4);
/* position compass */
RelativeLayout.LayoutParams CompRlp = (RelativeLayout.LayoutParams) compassButton.getLayoutParams();
CompRlp.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0);
CompRlp.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
CompRlp.setMargins(0, 180, 180, 0);
This moves the compass a bit further away from the top
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With