question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mapFragment issue with match_parent

See original GitHub issue

Hi, TnQ for this great library. There is a problem in my project. I have an activity contains BottomBar. ( Bellow Activity’s XML )

<CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!-- This is For Replacing Fragment -->
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        </NestedScrollView>
</CoordinatorLayout>

On one of BottomBars Tab has a mapFragment ( Bellow XML )

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <fragment
        android:id="@+id/frag_map"
        android:name="com.google.android.gms.maps.SupportMapFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</RelativeLayout>

The first problem is that when i trying to view this mapFragment its height collapses to a small height ( but in xml you see that its height is set to “match_parent”). I change the size of height manually (ex: 400dp. but We cant be sure that it fits the height of any device) and i can see map. But Second problem is that I cant scroll in vertical direction (in map).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
Xstar97commented, May 17, 2016

Did it work for you?

0reactions
TurKurT656commented, May 17, 2016

@Xstar97 I’ve not tested yet. Tnq for ur concern. i will inform you when i tested this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Height MapFragment Layout not work - Stack Overflow
came across this same issue but my map fragment is inside a scrollview and it needs to have a scrollview since there are...
Read more >
Bug: Options can't be set on MapFragments included in other ...
android:layout_width="match_parent" ... Same issue here, if the XML has only the Map fragment it works perfectly fine,but if there is a parent layout...
Read more >
SupportMapFragment | Maps SDK for Android
A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around...
Read more >
Support map fragment | Maps SDK v9 | Android - Mapbox docs
Include a map fragment within your app using Android support library. ... android:layout_height="match_parent". android:background="@color/md_divider_white".
Read more >
MapFragment ArcGis - The specified child already h... - Esri ...
The main content view --> <FrameLayout android:id="@+id/maps_app_activity_content_frame" android:layout_width="match_parent" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found