How can i call a method (loop)everytime after specific time always in android
<p>i want to call a method after every 5 seconds but it runs only one time when app starts </p>

<pre><code>     super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
     Handler delayhandler = new Handler();
     Runnable run = new Runnable() {
        @Override
        public void run() {
            loop();

        }
    };
    delayhandler.postDelayed(run, 5000);
     }

   void loop(){

  Toast.makeText(MainActivity.this, "ooh", Toast.LENGTH_SHORT).show();
  }
</code></pre>