microsoftarchive / android-sliding-layer-lib

Highly customizable SlidingLayer as you have seen in Wunderlist
http://wunderlist.com
Apache License 2.0
932 stars 279 forks source link

You think this is expensive? #72

Open sirvon opened 9 years ago

sirvon commented 9 years ago

Do you think this is too expensive to stuff all these sliding layers with child recyclerviews in one activity?

    <com.wunderlist.slidinglayer.SlidingLayer
        xmlns:slidingLayer="http://schemas.android.com/apk/res-auto"
        android:id="@+id/CashLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        slidingLayer:shadowDrawable="@drawable/sidebar_shadow"
        slidingLayer:shadowSize="0dp"
        slidingLayer:offsetDistance="0dp"
        slidingLayer:previewOffsetDistance="0dp"
        slidingLayer:stickTo="top"
        slidingLayer:changeStateOnTap="false">

    </com.wunderlist.slidinglayer.SlidingLayer>

    <com.wunderlist.slidinglayer.SlidingLayer
        xmlns:slidingLayer="http://schemas.android.com/apk/res-auto"
        android:id="@+id/PointsLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        slidingLayer:shadowDrawable="@drawable/sidebar_shadow"
        slidingLayer:shadowSize="0dp"
        slidingLayer:offsetDistance="0dp"
        slidingLayer:previewOffsetDistance="0dp"
        slidingLayer:stickTo="top"
        slidingLayer:changeStateOnTap="false">

        <com.marshalchen.ultimaterecyclerview.UltimateRecyclerView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/ShopShopsRV"
            app:recyclerviewClipToPadding="true"
            app:recyclerviewPadding="2dp">
        </com.marshalchen.ultimaterecyclerview.UltimateRecyclerView>

    </com.wunderlist.slidinglayer.SlidingLayer>

    <com.wunderlist.slidinglayer.SlidingLayer
        xmlns:slidingLayer="http://schemas.android.com/apk/res-auto"
        android:id="@+id/CommentsLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        slidingLayer:shadowDrawable="@drawable/sidebar_shadow"
        slidingLayer:shadowSize="0dp"
        slidingLayer:offsetDistance="0dp"
        slidingLayer:previewOffsetDistance="0dp"
        slidingLayer:stickTo="top"
        slidingLayer:changeStateOnTap="false">

    </com.wunderlist.slidinglayer.SlidingLayer>

    <com.marshalchen.ultimaterecyclerview.UltimateRecyclerView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:id="@+id/ShopShopsRV"
        app:recyclerviewClipToPadding="true"
        app:recyclerviewPadding="2dp">
    </com.marshalchen.ultimaterecyclerview.UltimateRecyclerView>

    <com.wunderlist.slidinglayer.SlidingLayer
        xmlns:slidingLayer="http://schemas.android.com/apk/res-auto"
        android:id="@+id/CommentsLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        slidingLayer:shadowDrawable="@drawable/sidebar_shadow"
        slidingLayer:shadowSize="0dp"
        slidingLayer:offsetDistance="0dp"
        slidingLayer:previewOffsetDistance="0dp"
        slidingLayer:stickTo="top"
        slidingLayer:changeStateOnTap="false">

        <com.marshalchen.ultimaterecyclerview.UltimateRecyclerView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/ShopShopsRV"
            app:recyclerviewClipToPadding="true"
            app:recyclerviewPadding="2dp">

        </com.marshalchen.ultimaterecyclerview.UltimateRecyclerView>
    </com.wunderlist.slidinglayer.SlidingLayer>

    <com.wunderlist.slidinglayer.SlidingLayer
        xmlns:slidingLayer="http://schemas.android.com/apk/res-auto"
        android:id="@+id/loqooCommentsLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        slidingLayer:shadowDrawable="@drawable/sidebar_shadow"
        slidingLayer:shadowSize="0dp"
        slidingLayer:offsetDistance="0dp"
        slidingLayer:previewOffsetDistance="0dp"
        slidingLayer:stickTo="top"
        slidingLayer:changeStateOnTap="false">

        <com.marshalchen.ultimaterecyclerview.UltimateRecyclerView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:id="@+id/ShopShopsRV"
            app:recyclerviewClipToPadding="true"
            app:recyclerviewPadding="2dp">
        </com.marshalchen.ultimaterecyclerview.UltimateRecyclerView>

    </com.wunderlist.slidinglayer.SlidingLayer>
JlUgia commented 9 years ago

No, not initially. The most expensive part is the animation. Assuming there is mostly one animation at a time, there should not be much different. But you let us know, I think this is something nobody has tried yet, publicly.

JlUgia commented 9 years ago

I'm curious though. All of them are stuck to the top. Is that they are showing at the same time altogether? Could you just replace the content when the layer is hidden?