I have a trouble with the circular progressBar, I have it in background in a layout as invisible. When I want to start the new activity I show it setting visible the layout, it is shown good but the animation of the progressBar works bad it sometimes rotate a little then stop after rotate a little more… It isn’t fluently. I try to solve with this but seems that didnt work:
button2.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
progressBar.setIndeterminate(true);
progressLayout.setVisibility(View.VISIBLE);
final CustomOverlayItem i = item;
Runnable intentRunnable = new Runnable()
{
public void run()
{
Intent intent = new Intent(context,Next.class);
startActivityForResult(intent, RETURN_FROM_MONUMENTO);
}
};
intentRunnable.run();
}
});
Thanks for your answers.
The part where you receive the data back from the other activity would be interesting. Sending the intent in a Runnable shouldn’t be necessary since that is a pretty inexpensive operation (I think). But receiving the result back can result in some heavy operations.
Stuttering animations are normally a sign that you are doing something on the UIThread you shouldn’t be doing (or that the device simply is too slow to handle the load of all threads).