ParallaxScroll icon indicating copy to clipboard operation
ParallaxScroll copied to clipboard

MapFragment in header?

Open kaiwinter opened this issue 9 years ago • 2 comments

I'm trying since hours to place a MapFragment as parallax header for a ListView. No luck. Is it possible with the library? With my XML below the ListView isn't scollable anymore. Can you help me out?

<com.nirhart.parallaxscroll.views.ParallaxScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:parallax_factor="1.9"
tools:context=".MainActivity" >

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <fragment
        android:id="@+id/staticmap"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        class="com.google.android.gms.maps.MapFragment" />

    <ListView
        android:id="@+id/listView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:paddingRight="5dp"
        android:scrollbarStyle="outsideOverlay" >
    </ListView>
</LinearLayout>

</com.nirhart.parallaxscroll.views.ParallaxScrollView>

kaiwinter avatar Mar 07 '15 16:03 kaiwinter

It's a bad idea to put listview inside scrollview, how about using parallax list view and put the map fragment as a parallaxed header?

nirhart avatar Mar 07 '15 19:03 nirhart

Yes, I know... I couldn't manage to put the map fragment as the header. As I declare it in the XML I didn't know where to put it else. I also tried to add the map fragment by code but also had difficulties which made this doesn't seem as a good solution to me.

kaiwinter avatar Mar 07 '15 19:03 kaiwinter