표시된 Google지도에 버튼을 추가하고 싶습니다. 내지도GoogleMap에 버튼을 추가하는 방법
GoogleMap map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
내가지도를 표시 할 조각을 사용하여 표시하고 레이아웃 XML은
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
내가보기에 버튼을로드 할 몇 가지 정보를 발견하지만, 그들의 단지 정상이다 Google지도가 아닙니다. 감사합니다.
버튼과지도가 동시에로드됩니다. 프로그래밍 방식으로 버튼을로드 할 수 있으므로 시간이되면로드 할 수 있습니다. – Bryanyan
동일한 레이아웃을 사용하고 버튼의 가시성을 보이지 않게 설정 한 다음 필요할 때 가시성을 변경할 수 있습니다. 그렇게하면 당신이 원할 때 나타납니다. –
map = ((SupportMapFragment) getSupportFragmentManager(). findFragmentById (R.id.map)). getMap();을 사용하여 맵을로드합니다. 전체 레이아웃을로드하는 방법? – Bryanyan