How do I implement a delay in onClick?
<p>I have an onclick on a table row, I want to change the color of the row for a second before the next screen is displayed. Is this possible? Here is my current code.</p>

<pre><code>public void onClick(View v) {
String sdet_id;
int det_id;
v.setBackgroundColor(Color.GRAY);
det_id = v.getId();
sdet_id = String.valueOf(det_id);
Intent i = new Intent();
i.setClassName("demo.learningdroid.com", "demo.learningdroid.com.details");
i.putExtra("Det_id", sdet_id);
startActivity(i);
v.setBackgroundColor(Color.TRANSPARENT);
// TODO Auto-generated method stub
}
});
</code></pre>
