Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312247

Change subject: Fix regression of clipping News items to padding.
......................................................................

Fix regression of clipping News items to padding.

One of our recent changes has brought back the issue of News items being
clipped to the padding/margin of their parent RecyclerView.

This correctly restores the no-clipping behavior, allowing the News items
to extend all the way to the edge of the card.

Change-Id: I42621c6cd075664bdca46e2b07e34d283dc6454f
---
M app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/47/312247/1

diff --git 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
 
b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
index 8f53e45..ecb9ccf 100644
--- 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
+++ 
b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
@@ -30,12 +30,11 @@
                 
R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical));
         recyclerView.addOnItemTouchListener(new DontInterceptTouchListener());
         recyclerView.setNestedScrollingEnabled(false);
-        recyclerView.setClipChildren(false);
+        recyclerView.setClipToPadding(false);
         MarginLayoutParams params = (MarginLayoutParams) 
recyclerView.getLayoutParams();
-        final int height = DimenUtil.roundedDpToPx(228);
-        params.height = height;
-        final int margin = DimenUtil.roundedDpToPx(12);
-        params.setMargins(margin, 0, margin, 0);
+        params.height = DimenUtil.roundedDpToPx(228);
+        final int padding = DimenUtil.roundedDpToPx(12);
+        recyclerView.setPadding(padding, 0, padding, 0);
     }
 
     protected abstract static class RecyclerAdapter<T>

-- 
To view, visit https://gerrit.wikimedia.org/r/312247
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42621c6cd075664bdca46e2b07e34d283dc6454f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to