Hello,
I need to refresh an activity each minute.
I found some code for refreshing and it is working good.
[code] mHandler.removeCallbacks(mUpdateTimeTask);
mHandler.postDelayed(mUpdateTimeTask, 10000);
private Runnable mUpdateTimeTask = new Runnable() {
public void run() {
Calendar now = Calendar.getInstance();
now.add(Calendar.MILLISECOND, 10000);
if (_lastFetchTime.compareTo(now) < 0 ){
}
_lastFetchTime.add(Calendar.MILLISECOND, 10000);
mHandler.postAtTime(this, _lastFetchTime.getTimeInMillis());
}
}[/code]
I need to refresh my all views (textviews, scroolviews..), after 10 seconds passed.
I tried to destroy all views under a container view by removeAllViews(); and removeAllViewsInLayout(); but no luck.
Any help would be appreciated..
thanks