Forum Xamarin.Android

Updating TextView problem

Hi,
I'm using WebClient to download some files, and I want to display download progress in TextView.

private void File_downloader_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
RunOnUiThread(() =>
{
txt.Text = String.Format("{0}/{1} - {2}%", current_downloading_file,total_files_to_download,e.ProgressPercentage.ToString());
//txt.Invalidate(); - doesn't work
});
}

But, the result is on attached image.

New text is over old text.

Tagged:

Best Answer

Answers

Sign In or Register to comment.