Skip to content

Conversation

@PierBover
Copy link

@PierBover PierBover commented Jul 7, 2016

Motivation
The docs on ActivityIndicator say that:

Size of the indicator. Small has a height of 20, large has a height of 36. Other sizes can be obtained using a scale transform.

But when using scale transform the pixels are blown out in iOS (haven't tested on Android).

For example when using this:

<ActivityIndicator style={{transform: [{scale: 2}]}} size="large" />

This is the zoomed result where you can clearly see the aliasing on the spinner is the result of an interpolation compared to the pixels of the text.

image

Solution
To remedy this, I've created two new sizes medium and extralarge so that these new sizes can be used without having to resort to using transform: [{scale: 2}] which I presume is causing the interpolation problem.

Added medium and extralarge
@ghost
Copy link

ghost commented Jul 7, 2016

By analyzing the blame information on this pull request, we identified @janicduplessis and @davidaurelio to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jul 7, 2016
*/
size: PropTypes.oneOf([
'small',
'medium',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed I think since this component is deprecated?

@janicduplessis
Copy link
Contributor

What about instead of adding more predefined sizes we allow passing an arbitrary number to size?

@PierBover
Copy link
Author

@janicduplessis since this is my first contribution I didn't want to mess around with the code too much.

I will look into this again when I have some time.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 16, 2016
@janicduplessis
Copy link
Contributor

#8935 added custom sizes so we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants