title: change color when tab on that button(selected) and get normal layout for other button
body: <p>i am creating dynamic button in one horizontal LinearLayout. now need to change color in background when i selected and at that time other button will be change as normal default layout.
  i already create like this:- <a href="https://i.stack.imgur.com/9zGzg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9zGzg.png" alt="enter image description here"></a></p>
  
  <p>my code like that :- </p>
  
  <pre><code>for(int i=0;i&lt;=5;i++)
                  {
                  LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                          LinearLayout.LayoutParams.WRAP_CONTENT,
                          LinearLayout.LayoutParams.WRAP_CONTENT,1.0f);
                  final TextView btn = new TextView(activity);
                  btn.setId(i);
                  final int id_ = btn.getId();
                  btn.setText("button " + id_);
  
  
                  //btn.setBackgroundColor(Color.rgb(70, 80, 90));
                  new_addonprice_name.addView(btn, params);
                      btn.setOnClickListener(new OnClickListener() {
                      @SuppressLint("ResourceAsColor") @Override
                      public void onClick(View v) {
                          // TODO Auto-generated method stub
  /*                      new_addonprice_name.removeAllViews();
                          String  aaa = updatebutton();*/
                             btn.setSelected(true);
  
                          Toast.makeText(activity, btn.getText().toString(), Toast.LENGTH_SHORT).show();
                          btn.setBackgroundColor(R.color.black);
                      }
                  });
              }
  </code></pre>