java - How to set a button which would repeat its task? -


this first app, i've ever programmed , create button repeat task after pressing once. code use download values yahoo server:

public class mainactivity extends activity implements view.onclicklistener{      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);     }      @override     public boolean oncreateoptionsmenu(menu menu) {         // inflate menu; adds items action bar if present.         getmenuinflater().inflate(r.menu.main, menu);         return true;     }      public void onclick (view v) {}      public void go (view v) {         intent myintent =new intent (intent.action_view);         myintent.setdata(uri.parse("http://download.finance.yahoo.com/d/qoutes.csv?s=clm13.nym&f=nb3gh"));         startactivity(myintent);         toast.maketext(this, "done!", toast.length_short).show();     } } 

i've read timer , handler commands, i'm unfortunately not enough skilled apply them. has idea how command repeating of opening url?

thank thomas


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -