Created
May 1, 2013 07:21
-
-
Save bbirec/5494147 to your computer and use it in GitHub Desktop.
Relative layout trick
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<RelativeLayout android:id="@+id/map_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
</RelativeLayout> | |
<Button android:id="@+id/current_location_center" | |
android:layout_width="50dp" | |
android:layout_height="0dp" | |
android:layout_centerInParent="true" | |
android:visibility="invisible" | |
android:contentDescription="My location dummy"/> | |
<ImageView android:id="@+id/current_location" | |
android:layout_width="40dp" | |
android:layout_height="40dp" | |
android:src="@drawable/marker_pin" | |
android:layout_centerHorizontal="true" | |
android:layout_alignBottom="@id/current_location_center" | |
android:contentDescription="My location"/> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment