koleton icon indicating copy to clipboard operation
koleton copied to clipboard

LinearLayout Support - loading skeleton messes recycler view orders in parent view.

Open TurKurT656 opened this issue 5 years ago • 3 comments

First of all, Thank you for your fast bugfixes. I appreciate that. I'll try to help you with reporting bugs and as soon as I can, I will contribute on the lib.

About this issue, take this layout hierarchy:

<androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

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

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_first"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_second"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

            </LinearLayout>

 </androidx.core.widget.NestedScrollView>

So when I try to call .loadSkeleton() function on both of the RecyclerViews their order changes. so on loading state the first RV shows at bottom and the second one shows at the top.

TurKurT656 avatar Jul 21 '20 21:07 TurKurT656

I found the problem. The issue is coming from LinearLayout. I've changed the container to ConstraintLayout and problem fixed. Any idea why LinearLayout has problem with this lib?

TurKurT656 avatar Jul 25 '20 17:07 TurKurT656

Hi!, @TurKurT656. Sorry for late reply.

LinearLayouts are not yet supported!!. You can use another ViewGroup. For example ConstraintLayout, just like you said.

I'll be working in this new feature.

Thanks a lot! ✌️ ✌️

ericktijerou avatar Jul 30 '20 16:07 ericktijerou

Any updates for this issue? Using FlexboxLayout is also messes the recycler view orders. Also, I have to convert all recycler view parents to another ViewGroup only to temporarily fix this issue.

drianmr avatar May 18 '21 09:05 drianmr