PK0513
PK0513

Reputation: 57

Android: Button at the corner of maps

I wanted to create a button in my Android maps at the top right corner(has to stay there all the time, even if I move in the map). when tapped the map should go to satellite view, when tapped again it should come back to street view.

I have the code for street view and map view, I just want to know how to create a button that stays always at the top right corner.

Thanks

Upvotes: 0

Views: 284

Answers (1)

Yashwanth Kumar
Yashwanth Kumar

Reputation: 29121

<RelativeLayout>
<Button
   android:layout_alignParentRight="true"
   android:layout_alignParentTop="true"
/>
// place your other map or street view here.

</RelativeLayout>

use this layout.

Upvotes: 2

Related Questions