I am observing the unexpected behavior of Google Maps. The problem is that the map gets the top and bottom crop using a fragment of the support map, if I use full screen mode, the map will be fully visible, as shown in Figure 1, but if I use the height or weight of the map, the map will not be fully visible. as shown in figure 2.
xml layout for image 1:
<fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/map" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.paki.venturedive.awtest.MapsActivity" />
xml layout for image 2:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/map" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.6" tools:context="com.paki.venturedive.awtest.MapsActivity" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:text="Hello world" android:layout_weight="0.4" />
Java Code:
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps);
In Figure 2, I (the User will be) unable to see the Arctic Ocean over the Greenland region, as well as the region of the lower region, will be absent, as shown in Figure 3
.
Has anyone come across this problem or does anyone know how to deal with it?
Any links or tips would be kindly appreciated.
,
.
source share