I'm creating an android application and I have an Activity including a ScrollView and a MapView in it.
When I scroll the ScrollView a black render appear around google map . like this video https://www.youtube.com/watch?v=tBkU7FuNawE&feature=youtu.be
Here is my code
activity_test_map_view.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
//some content
</LinearLayout>
<com.google.android.gms.maps.MapView
android:id="@+id/map_view"
android:layout_width="match_parent"
android:layout_height="250dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
//some content
</LinearLayout>
</LinearLayout>
</ScrollView>
TestMapViewActivity
public class TestMapViewActivity extends AppCompatActivity implements OnMapReadyCallback{
MapView mapView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_map_view);
// // Gets the MapView from the XML layout and creates it
mapView.onCreate(savedInstanceState);
// Gets to GoogleMap from the MapView and does initialization stuff
mapView.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap googleMap) {
}
}
How can I solve this problem?