Progressdialog und input Sperre

  • 2 Antworten
  • Letztes Antwortdatum
M

missG

Neues Mitglied
0
ich habe nach folgendem schema
Code:
[B][COLOR=darkred]private[/COLOR][/B] ProgressDialog verlauf;
...
 
 
[SIZE=2][COLOR=#7f0055][B][SIZE=2][COLOR=#7f0055]public [/COLOR][/SIZE][/B][/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onClick(View view) {[/SIZE]

[LEFT][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]   verlauf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = ProgressDialog.[I]show[/I]([/SIZE]
[LEFT][SIZE=2]   CustomImageView.[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2],[/SIZE]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]   "Bitte warten..."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE]
[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]   "Berieselung erfolgt!"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2],[/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]    true[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// [U]zeitlich[/U] [U]unbeschränkt[/U][/COLOR][/SIZE][/COLOR][/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]    false[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2]); [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// [U]nicht[/U] [U]unterbrechbar[/U][/COLOR][/SIZE][/COLOR][/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055] new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Thread() {[/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]    public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] run() {[/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]    try[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] {[/SIZE]
[SIZE=2][I]  sleep[/I](5000);[/SIZE]
[SIZE=2]         } [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]catch[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] (Exception e) { }[/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]   verlauf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].dismiss(); [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// dialog [U]schließen[/U][/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]  } [/SIZE]
[SIZE=2] }.start();[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]


[SIZE=2]});[/SIZE][/LEFT]

Ich möchte während der Progressdialog aktive ist, alle eingaben sperren.
Ich dachte, wenn ich die Progressdialog starte passiert dies automatisch. allerdings, wenn ich nachdem die Progressdialog gestertet ist den bildschirm berühre, komme ich nicht mehr zurück. home button klappt, aber der bach nicht.​

hab ich im code was falsch?​
 
Mit false sagst du, dass man den Dialog über die Back Taste nicht beenden kann...
Nachdem du dialog.dismiss(); aufgerufen hast, wird der Back Button wieder seine ursprüngliche Funktion annehmen.
 
mein mein fehler entdeckt, lag an einem anderen codepart....

danke für die antwort...
 
Zurück
Oben Unten