FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
progressbar and threads? example needed
progressbar and threads? example needed
Débuté par KJVA, 15 juil. 2015 13:01 - Aucune réponse
Connectez-vous…
KJVA
#1
Posté le 15 juillet 2015 - 13:01
In my android app I want to show an infinite progressbar when someone pushes a button to upload files.
Now I have the upload functionality in a secondary thread, but this stops the mainthread and thus the animation of the progressbar.
Click
BTN_
VerstuurMelding
{
PROGBAR_
PROGRESS_LinearNative
..
Visible
=
True
ThreadExecute
(
"verstMeld"
,
threadNormal
,
"VerstuurMeldingen"
)
ThreadWait
(
"verstMeld"
,
Infinite
)
PROGBAR_
PROGRESS_LinearNative
..
Visible
=
False
}
and if I want to show the progressbar in a secondary thread. It gives the error: "Only the original thread that created a view hierarchy can touch its views":
Click
BTN_
VerstuurMelding
{
ThreadExecute
(
"progressbar"
,
threadNormal
,
"ShowProgressbar"
)
}
Procedure
ShowProgressbar
(
)
IF
(
PROGBAR_
PROGRESS_LinearNative
..
Visible
)
THEN
PROGBAR_
PROGRESS_LinearNative
..
Visible
=
False
ELSE
PROGBAR_
PROGRESS_LinearNative
..
Visible
=
True
END
Can someone provide an example that shows how I can show an animating progressbar during the execution of a secondary thread?
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte