Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onResume() {
- super.onResume();
- updateTimer = new Timer();
- updateTimer.schedule(new updateTask(new Handler(),this),0,1000);
- dataSource.open();
- AdjustTimers();
- CheckTimers();
- }
- public void update() {
- Log.i("DEBUG", "Updating layout");
- }
- private class updateTask extends TimerTask {
- Handler handler;
- ActionBarActivity ref;
- public updateTask(Handler handler,ActionBarActivity ref) {
- super();
- this.handler = handler;
- this.ref = ref;
- }
- @Override
- public void run() {
- handler.post(new Runnable() {
- public void run() {
- ref.update(); //cannot find method
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement