Skip to content

Commit

Permalink
🐛 upgrade to v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
huahongyang committed Dec 11, 2018
1 parent 776327d commit 3284f68
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/captures
.externalNativeBuild
.idea
/sample/build
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 26
versionCode 9
versionName "1.1.1"
versionCode 10
versionName "1.1.2"
}
buildTypes {
release {
Expand All @@ -27,7 +27,7 @@ publish {
userOrg = 'ethanhua'
groupId = 'com.ethanhua'
artifactId = 'skeleton'
publishVersion = '1.1.1'
publishVersion = '1.1.2'
bintrayUser = 'ethanhua'
bintrayKey = ''
desc = 'a library provider a easy way to show skeleton loading view'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
Expand All @@ -13,6 +14,11 @@ public class ShimmerViewHolder extends RecyclerView.ViewHolder {
public ShimmerViewHolder(LayoutInflater inflater, ViewGroup parent, int innerViewResId) {
super(inflater.inflate(R.layout.layout_shimmer, parent, false));
ViewGroup layout = (ViewGroup) itemView;
inflater.inflate(innerViewResId, layout, true);
View view = inflater.inflate(innerViewResId, layout, false);
ViewGroup.LayoutParams lp = view.getLayoutParams();
if (lp != null) {
layout.setLayoutParams(lp);
}
layout.addView(view);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ private ShimmerLayout generateShimmerContainerLayout(ViewGroup parentView) {
shimmerLayout.setShimmerAngle(mShimmerAngle);
shimmerLayout.setShimmerAnimationDuration(mShimmerDuration);
View innerView = LayoutInflater.from(mActualView.getContext()).inflate(mSkeletonResID, shimmerLayout, false);
ViewGroup.LayoutParams lp = innerView.getLayoutParams();
if (lp != null) {
shimmerLayout.setLayoutParams(lp);
}
shimmerLayout.addView(innerView);
shimmerLayout.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
//implementation project(':library')
implementation 'com.ethanhua:skeleton:1.1.1'
implementation 'com.ethanhua:skeleton:1.1.2'
implementation 'io.supercharge:shimmerlayout:2.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
Expand Down

0 comments on commit 3284f68

Please sign in to comment.