1
我的FrameLayout的小孩MapBoxViewMapBox的Android佈局無效時,父視圖改變大小
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:mapbox="http://schemas.android.com/apk/res-auto">
<com.mapbox.mapboxsdk.views.MapView
android:id="@+id/mapBoxMapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
mapbox:access_token="@string/accessTokenMapBox"/>
</FrameLayout>
更改父視圖的大小,但MapView類沒有更新佈局
我嘗試打電話requsetLayout()嘗試invalidateLayout() - 沒有效果。
這不起作用。地圖還在削減。 –
如果你仍然有這個問題,我可以幫助你發佈你的java代碼,改變佈局。現在用你發佈的代碼,我沒有看到任何問題。 – cammace