I'm trying to display a custom button on a googlemap.
<Button
android:id="@+id/button_backHome"
android:layout_alignParentRight="true"
android:layout_marginTop="50dp"
android:layout_marginRight="11.5dp"
android:layout_height="39dp"
android:layout_width="39dp"
android:background="@drawable/custom_button"
/>
This displays the button directly below googlemap's Set Camera to Current location button in the top right of the screen, but obviously only on my test device. On other devices these settings don't align the button correctly.
XXHDPI (galaxy S4)

XHDPI (Nexus 10)

What would be a good solution, other then making all the buttons myself? Could I inherit the margins from the google button without knowing the style's name?
I'm pretty much at a loss here, and any help would be Much apreciated.
Thanks in advance!
from Android Google Maps API - align custom button with existing buttons
No comments:
Post a Comment