[android-developers] getting exception on updating ui?

2011-06-04 Thread Hitendrasinh Gohil
Here is my playerview class.when the song first time played total song duration is set and seekbar runs,but when i do next the total song duration is of firstsong and it gives exception. package com.musix.main; import com.musix.main.R; import android.app.Activity; import android.os.Bundle;

Re: [android-developers] getting exception on updating ui?

2011-06-04 Thread Mark Murphy
Your code has... issues. 1. You do need to not manually import com.musix.main.R -- it is automatically imported since your class resides in the same package as R. 2. Do not fork a thread to update a progress indicator. Use postDelayed() (available on any View) to schedule a Runnable that updates