Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

animating in activityindicator

import React, { Component } from 'react';
import {
  Text,
  View,
  StyleSheet,
  TextInput,
  TouchableHighlight,
  ActivityIndicator
} from 'react-native';

export class Login extends Component {

    constructor(props) {
        super(props);

        this.state = {
            showProgress: false
        };
    }

    render() {
        return (
            <View>

                <TouchableHighlight onPress={this.progressOff.bind(this)}>
                    <Text>progressOff</Text>
                </TouchableHighlight>

                <TouchableHighlight onPress={this.progressOn.bind(this)}>
                    <Text>progressOn</Text>
                </TouchableHighlight>

                <ActivityIndicator animating={this.state.showProgress} size="large"/>
            </View>
        );
    }

    progressOff() {
        this.setState({showProgress: false}); 
    }

    progressOn() {
        this.setState({showProgress: true});
    }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: regex not before 
Javascript :: how to set up click event listeners javascript 
Javascript :: straforma in string js 
Javascript :: everything be true freecodecamp 
Javascript :: launch chrome in incognito and dev tools 
Javascript :: jshint defined variable which are coming from different file 
Javascript :: firebase js loop 
Javascript :: what is x path js 
Javascript :: convert js to typescript online 
Javascript :: tower defense bullet following enemy with range javascript 
Javascript :: patch if else use 
Javascript :: javascript bind keyboard key 
Javascript :: Nested objects and files 
Javascript :: enzyme to json 
Javascript :: Uncaught TypeError: table.fnColReorder.transpose is not a function 
Javascript :: window coordinates 
Javascript :: javascript prototype chaining in stackoverf 
Javascript :: js how to find not unic values in array 
Javascript :: jq unique by object attribute in list 
Javascript :: how to pass parameter in javascript function from html 
Javascript :: express.js 
Javascript :: submit file js 
Javascript :: nuxt auth no provider 
Javascript :: what is the opposite of lazy initialization 
Javascript :: formulaire sauvegarde local storage jquery 
Javascript :: js to ts converter 
Javascript :: js download video element 
Javascript :: solo letras js 
Javascript :: react jsx hello react sample 
Javascript :: converting JSON to jsObject 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =