how to use on resume method()?
<p>help me  to do this, i have button image  it should be unselected,when i click it should be selected if i go next activity and if i come back it should be selected,if i was not selected before going next activity it should be unselected.how can i do this i have 32 buttons totally in activity 1.</p>

<pre><code>dwn15=(Button)findViewById(R.id.adultdwn15);
dwn15.setOnClickListener(new View.OnClickListener() {
      public void onClick(View view){
        if(teeth[30]==0){
           dwn15.setBackgroundResource(R.drawable.adultdwn15);          
           teeth[30]=31;
        }
        else{

          dwn15.setBackgroundResource(R.drawable.adultdwn15_pressed);       

          teeth[30]=0;
        }
      }
    });
</code></pre>
