team-supercharge / ShimmerLayout

DEPRECATED - Memory efficient shimmering effect for Android applications by Supercharge.
Apache License 2.0
2.52k stars 284 forks source link

Is there any way to set the width of the rolling shimmer line that animates? #26

Closed AamirAbro closed 6 years ago

veghtomi commented 7 years ago

@AamirAbro No, the width of the shimmer line is proportional to the width of the layout.

AamirAbro commented 7 years ago

thanks but should there be at-least some way to configure this may be if not directly setting size then setting what proportion (ratio) of width would be that shimmer line?

veghtomi commented 7 years ago

What do you think about an attribute which would define the width of shimmerline as percentage proportional to the layout width?

veghtomi commented 7 years ago

I will create it in the next week.

AamirAbro commented 7 years ago

thanks that will be great!

veghtomi commented 6 years ago

@AamirAbro here are my solutions for your issue, please check it! I used 0 angle for this shimmer animation. I would create two more attributes. One for the width of the line, the other for the width of the main color, which would define the width of this color at the center. Hence, the width of the transparent parts at the edges would be less. See the third image.

@szugyi What is your opinion?

This is the original version: original_version

Here the shimmer line is wider, this would be the maximum width: wider_version

Now the shimmer line is wider as well, but also the user can change that how wide the main color should be, so the transparent part at the edges would be less wide. The main color (red) at the center is much wider and the transparent parts will appear further from the center. wider_version_with_less_transparent_edge

szugyi commented 6 years ago

@veghtomi Looking good! I would suggest calling the "line" width, mask width, and the size of the "color", gradient width to avoid confusion. The attributes might be mask_width and gradient_width or something similar.

veghtomi commented 6 years ago

The new, 1.1.0 version contains this feature!

QumberAbbas commented 6 years ago

<3

On Mon, Dec 11, 2017 at 8:21 PM, Végh Tamás notifications@github.com wrote:

The new, 1.1.0 version contains this feature!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/team-supercharge/ShimmerLayout/issues/26#issuecomment-350755211, or mute the thread https://github.com/notifications/unsubscribe-auth/AJhv-mPKJPr3iRyTOzNm8Ki-6TEd7Cw4ks5s_Uh1gaJpZM4QQ71l .

-- Regards

Qumber Abbas+92 3314336096