param param - 1 year ago 166
Android Question

Auto refresh the activity

In my application I have a activity that displays contents from internet..... I just want to know how can I auto refresh the activity.....

Please suggest and provide some code block if possible.

Answer Source

try this one, it works well :)

    public void onCreate(Bundle savedInstanceState)  

    this.mHandler = new Handler();



private final Runnable m_Runnable = new Runnable()
    public void run()

        Toast.makeText(refresh.this,"in runnable",Toast.LENGTH_SHORT).show();

        refresh.this.mHandler.postDelayed(m_Runnable, 5000);            

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download