Here I will explain how to use the spinner bar (a rotating progress indicator). Basically the program is the same as in the previous post: it asks for the running time and then starts the spinner.
The code is shown below:
#Se importa los módulos android y time
import android, time
#Se instancia el objeto Android
droid = android.Android()
#Se define un título y un mensaje
title = 'Spinner'
message = 'Este es un simple progreso spinner.'
#Se solicita se escriba el tiempo a ejecutar
numero = droid.getInput("Escriba el tiempo","tiempo:")
#Se crea la barra de progreso spinner con el título y mensaje
droid.dialogCreateSpinnerProgress(title, message)
#Se muestra la barra de progreso
droid.dialogShow()
#Se genera un tiempo de espera dado el número de entrada
time.sleep(int(numero[1]))
#Se cierra la barra de progreso spinner
droid.dialogDismiss()
The following figure shows the running time input.
Below is the spinner progress bar.
Finally, here is the QR code of the program.
===
Make a donation! If you liked the article you can make a donation with Bitcoin (BTC) using the digital wallet of your choice at the following address: 17MtNybhdkA9GV3UNS6BTwPcuhjXoPrSzV
Or by scanning the QR code from your wallet:
