i have this fatty fat upload i do (relative to mobile devices). i do this in a thread so that the rest of the device is accessible. in that thread i am accessing a view inside of my custom title. here is the thread:
private OnClickListener send = new OnClickListener() {
public void onClick(View v) {
new Thread(new Runnable() {
public void run() {
_showView(R.id.progressBar1, true);
AmazonS3Client s3 = new AmazonS3Client(
new BasicAWSCredentials("abc",
"123"));
for(Video v : video.getVideos()) {
s3.putObject(
"bucket",
"remote_path"
new File("some_file");
}
_showView(R.id.progressBar1, false);
}
}).start();
}
};
private void _showView(int resourceId, boolean show) {
if (show) {
findViewById(resourceId).setVisibility(View.VISIBLE);
} else {
findViewById(resourceId).setVisibility(View.GONE);
}
}
how can i access the views of the custom title bar?
Every thing like this method..
which tries to change UI Should be done using a handler or runOnUiThread.. only main thread can access UI changes..