title: Android - Set Clicked focus on Button
body: <p>I am having 4 buttons in my layout, now whenever i click any button, after the click event, button should be highlighed showing that it was clicked last.</p>
  
  <p>For making such thing, i have tried the following:</p>
  
  <p>code:</p>
  
  <pre><code>btn1.setOnClickListener(new button_click_listener());
  btn2.setOnClickListener(new button_click_listener());
  
  
  class button_click_listener implements Button.OnClickListener
  {
      @Override
      public void onClick(View v) 
      {
         if(v==btn1)
         {
              btn1.requestFocus();
         }
  
         if(v==btn2)
         {
              btn2.requestFocus();
         }
          .......
      }
  }
  </code></pre>
  
  <p>XML Layout:</p>
  
  <pre><code>&lt;Button 
     android:text="Click 1" 
     android:id="@+id/btnClick1" 
     android:layout_width="70dp" 
     android:layout_height="wrap_content"
     style="@android:style/Widget.Button.Small"
     android:padding="10dp"
     android:focusableInTouchMode="true"&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p><strong>How do i show clicked highlight on the button that was clicked last?
  Please, show me a way and give suggestions.</strong></p>
  
  <h2>Update:</h2>
  
  <p>If i set <strong><code>android:focusable="true"</code></strong> then button is highlighted and focused, but then at the same time, i need to click twice on the button to perform the actual click event.</p>