[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix regression of clipping News items to padding.

2016-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

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, 3 insertions(+), 3 deletions(-)

Approvals:
  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved



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..12c554e 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,12 @@
 
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);
+final int padding = DimenUtil.roundedDpToPx(12);
+recyclerView.setPadding(padding, 0, padding, 0);
 }
 
 protected abstract static class RecyclerAdapter

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42621c6cd075664bdca46e2b07e34d283dc6454f
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix regression of clipping News items to padding.

2016-09-22 Thread Dbrant (Code Review)
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

-- 
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 

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