Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Add ability to retrieve previously set Shimmer
Browse files Browse the repository at this point in the history
Summary: This allows you to easily incorporate existing config changes into a new Shimmer object via copyFrom()

Differential Revision: D21420996

fbshipit-source-id: 1de93bbe8cab3ca038ad67e520d9da9f1e6415bc
  • Loading branch information
xiphirx authored and facebook-github-bot committed May 6, 2020
1 parent 901b641 commit 53c1385
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -57,6 +57,10 @@ public void setShimmer(@Nullable Shimmer shimmer) {
invalidateSelf();
}

public @Nullable Shimmer getShimmer() {
return mShimmer;
}

/** Starts the shimmer animation. */
public void startShimmer() {
if (mValueAnimator != null && !isShimmerStarted() && getCallback() != null) {
Expand Down
Expand Up @@ -88,6 +88,10 @@ public ShimmerFrameLayout setShimmer(@Nullable Shimmer shimmer) {
return this;
}

public @Nullable Shimmer getShimmer() {
return mShimmerDrawable.getShimmer();
}

/** Starts the shimmer animation. */
public void startShimmer() {
mShimmerDrawable.startShimmer();
Expand Down

0 comments on commit 53c1385

Please sign in to comment.