How to hidden layout while screen didn't be touch?
<p>I has use OnTouchListener to visible layout1 while screen was touch.
Now I want invisible layout1 while the screen didn't be touch three seconds.
But I don't know which event listener can I use?</p>

<p>Now the problem has be resolved.
But another one was appear.
I use:</p>

<pre><code>class unTouchTask extends TimerTask {
public void run() {
if(untouch == true) {
RelativeLayout rl = (
RelativeLayout)findViewById(R.id.relativeLayout2);
rl.setVisibility(View.INVISIBLE);
timer.cancel();
untouch = false;}
}
    }
</code></pre>

<p>Below error on line<code>rl.setVisibility(View.INVISIBLE);</code>:</p>

<pre><code>android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
</code></pre>
