Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Thread t = new Thread(){@Override
- public void run(){
- try{
- while(!isInterrupted()){
- Thread.sleep(1000);
- runOnUiThread(new Runnable() {
- @Override
- public void run() {
- TextView textViewTime = findViewById(R.id.textTimer);
- long time = System.currentTimeMillis();
- textViewTime.setText(time);
- }
- });
- }
- } catch (InterruptedException e) {
- }
- }
- };
- t.start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement