2013-04-22 3 views
2

I은 ​​문제가 있다면, 나는지도보기를 사용할 수 있습니다 내가 제대로지도를 참조하십시오으로 MapFragment 및지도보기 API v2를

:

<com.google.android.gms.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/map" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"/> 

을하지만 난 MapFragment가 응용 프로그램 충돌 ... 오류 팽창 수준의 조각을 사용하는 경우

<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"/> 

main.java 만의 :

public class situar_mapav3 extends android.support.v4.app.FragmentActivity{ 

    public situar_mapav3() { 


    } 
     @Override 
     protected void onCreate(Bundle savedInstanceState) { 

      super.onCreate(savedInstanceState); 
    } 

어떤 생각? 감사.

답변

0

당신은이

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/mapParent" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <fragment 
     android:id="@+id/map" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="1" 
     class="com.google.android.gms.maps.SupportMapFragment" /> 
</LinearLayout> 
3

더 문제가 아닌 android.support의 com.google.android.gms.maps.SupportMapFragment을 확장 할 수 이해하는 데 도움이 될 것입니다이 레이아웃을 사용하고, PLZ, 당신은 로그를 로그 캣 게시하려고 .v4.app.FragmentActivity