GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV Mobile 2024
→
progressbar and threads? example needed
progressbar and threads? example needed
Iniciado por KJVA, jul., 15 2015 1:01 PM - Sem resposta
Conecte-se…
KJVA
#1
Publicado em julho, 15 2015 - 1:01 PM
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?
Denunciar
0
0
→ Voltar para WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto