Skip to content

Suggestion: passing a customised ActivityIndicator or SpinnerComponent #51

@gameboyVito

Description

@gameboyVito

I have read your source code and found that there is no way to pass a customised loading spinner to replace the default ActivityIndicator. The default one is ugly and we would like to replace it with our own component. Maybe you can just rewrite this part to support this feature. Or I can just send you a PR if you are acceptable.

render() {        
        if (!this.state.isRemote && !this.props.defaultSource) {
            return this.renderLocal();
        }

        if (this.state.cacheable && this.state.cachedImagePath) {
            return this.renderCache();
        }
        
        if (this.props.defaultSource) {
            return this.renderDefaultSource();
        }

       if (this.props.customSpinner) {
             return (
                 this.props.customSpinner();
            );
       } else {
              return (
                  <ActivityIndicator {...this.props.activityIndicatorProps} />
            );
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions