IT기술(코딩)
안드로이드 스튜디오 네이버맵 크기조정 방법. naver map
크리에이트매이커
2021. 8. 26. 22:07
반응형
안녕하세요 여러분.
가끔 글중에 네이버맵 API이용시 멥 자체 크기를 어떻게 제어하는지 궁금해 하시는 분들이 꽤있어서 알려드릴게요~
아주 간단해요.
frameLayout에 map을 넣어주면 됩니다!!
바로 코드 뿌릴게요~
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
<Button
android:id="@+id/enter"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:text="@string/enter" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="14">
<fragment
android:id="@+id/map"
android:name="com.naver.maps.map.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
위 코드처럼 xml 파일을 해주면 frameLayout에 맞게 네이버멥 NaverMap 크기가 맞춰져요~~
쉽죠~~
그럼 다음엔 더 좋은 글로 볼게요~ 안녕~
반응형