android - MapFragment zero height upon landscape orientation -
i have android activity map fragment , couple of text views , linear layouts
<?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" > <textview /> <textview /> <fragment android:id="@+id/map" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" class="com.google.android.gms.maps.mapfragment" /> <textview /> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > </linearlayout> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > </linearlayout> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > </linearlayout> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > </linearlayout> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center"> </linearlayout> </linearlayout>
i have assigned android:layout_weight="1"
map fragment since want capture half of screen.the rest of views have 0 weight.everything works fine in orientation_portrait
.however if rotate phone (orientation_landscape
) map has 0 height , appears thick line.can help?
Comments
Post a Comment