java - Mapsforge add button to Mapview -
java - Mapsforge add button to Mapview -
i working on android app skier , snowboarder should navigate user 1 point another.
to show map using mapsforge-version 0.4.0.
on map have added layers , want add together imagebutton attempts failed. have ideas how without xml-file?
i new , first question, if have forget info please allow me know.
step 1 : avoid setting content view mapview
// setcontentview(mapview); step 2 : add together button linearlayout add together linearlayout relativelayout
<relativelayout android:id="@+id/rlmap" android:layout_width="fill_parent" android:layout_height="fill_parent"> <linearlayout android:id="@+id/llcontrols" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_alignparentbottom="true" android:layout_alignparentleft="true" android:layout_alignparentstart="true"> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new button" android:id="@+id/button" /> </linearlayout> </relativelayout> step 3 : find relativelayout , add together mapview object it
relativelayout rlmap = (relativelayout) findviewbyid(r.id.rlmap); rlmap.addview(mapview,0); java android imagebutton mapsforge
Comments
Post a Comment