This article will explain how to create a message with a continue button; after pressing the button, a message with the result of the button is shown.
The application code is the following:
#Importar módulo android
import android
#Se crea la instancia del objeto Android
droid = android.Android()
#título y mensaje del botón
title = 'Interfaz de usuario'
message = 'Esta es una prueba'
#Se crea la alerta con el título y mensaje
droid.dialogCreateAlert(title, message)
#Se define el botón
droid.dialogSetPositiveButtonText('Continuar')
#Se muestra el mensaje
droid.dialogShow()
#Se captura el resultado del resultado de darle clip al botón
#El resultado es un diccionario
response = droid.dialogGetResponse().result
#Se muestra el resultado del clip del botón
droid.makeToast('El resultado de la ejecucion del boton es: %s'
%response['which'])
The button is shown below.
The following figure shows the message with the result of clicking the button.
To finish, here is the image of the program's qr code.
===
Make a donation! If you liked the article you can make a donation with Bitcoin (BTC) using the digital wallet of your choice to the following address: 17MtNybhdkA9GV3UNS6BTwPcuhjXoPrSzV
Or by scanning the QR code from your wallet:
