twoway-view
twoway-view copied to clipboard
Padding problem
Hey,
I use a TwoWayView withing a viewpager and when I apply a padding top and I swipe up to get to the top of the list it adds a padding again and again.
@dommerq You mean scrolling down then back to the top? What layout manager are you using?
When my two-way view is at the top, and I scroll up, it adds padding
I'm using ListLayoutManager
Do you mean you wanted something like the clipToPadding="false"
behaviour that you get from ListView
? This will be covered in #93.
No, what I'm describing is a bug, not a missing feature :) It adds padding when I'm scrolling up
I have the same issue. Scrolling down then back up, padding keeps added to the view and when the padding exceeds the screen size, the view disappears.
@dommerq Got it, I'll look into it Thanks for the report.
Cheers,
if you need any help, ping me ;)
I can confirm and send code to reproduce. For me, the bug only appeared (or is worst) when I started using app compat 21.
@lucasr could you help fix this soon? would greatly appreciate.
Similar issue here, when using TwoWayView configured like this:
<TwoWayView
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="444dp"
android:clipToPadding="false"
android:layout_marginTop="32dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:overScrollMode="never"
android:orientation="horizontal"
app:twowayview_layoutManager="SpannableGridLayoutManager"
app:twowayview_numRows="2"
/>
Whenever data is being added to the adapter (content provider changes), the padding seems to be added to the "start" side.
AppCompat v21.
I have the same issue but am not setting padding:
<org.lucasr.twowayview.widget.TwoWayView
android:id="@+id/gallery_grid_layout"
android:layout_below="@+id/etoolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:layout_marginRight="2dp"
android:layout_marginLeft="2dp"
app:twowayview_layoutManager="GridLayoutManager"
app:twowayview_numColumns="3" />
Also using AppCompat v21
Video of the issue: https://vid.me/ntVs
When I trigger this issue I notice that it happens when scrolling, where newly added items causes the grid to "snap" so that the first row of items on the screen are fully visible. This "movement" seems to be tied to the extra spacing when scrolled back to the top of the grid.
Actually this could be a separate issue
As far as I've discovered, this behavior can be reproduced when using items that call repaint during scroll.
Example: I have a list of pictures that are downloaded from internet. I scroll to the screen which have no "cached" pictures on it, so they're starting to download. If first visible view on screen needs to be repainted and it's not fully shown now, it'll scroll all the content down/right, so it'll be in the screen, at the very beginning of TwoWayView. This leads us to list flicking, also it affects top padding.
Maybe, it's also the source of https://github.com/lucasr/twoway-view/issues/156 problem
You can try fix proposed in https://github.com/lucasr/twoway-view/pull/167, at least it have fixed issue for me
I am facing this same issues. I am using picasso to load the images from the internet and its causing the padding issue. Will there be fix of this in future.