Skip to content

Commit

Permalink
Swipe gravity fix for wrap content case
Browse files Browse the repository at this point in the history
  • Loading branch information
janishar committed Oct 13, 2016
1 parent f4daead commit 875ffe1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions placeholderview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/janishar/PlaceHolderView'
gitUrl = 'https://github.com/janishar/PlaceHolderView.git'

libraryVersion = '0.2.8'
libraryVersion = '0.2.9'

developerId = '[email protected]'
developerName = 'Janishar Ali'
Expand All @@ -32,7 +32,7 @@ android {
minSdkVersion 16
targetSdkVersion 24
versionCode 7
versionName "0.2.8"
versionName "0.2.9"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ protected FrameLayout.LayoutParams getLayoutParamsWithSwipeDecor(int position, S
}else{
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
layoutParams.gravity = Gravity.CENTER;
layoutParams.gravity = decor.getViewGravity();
layoutParams.setMargins(decor.getPaddingLeft() * position, decor.getPaddingTop() * position, 0, 0);
return layoutParams;
}
Expand Down

0 comments on commit 875ffe1

Please sign in to comment.