title: Change textview color from an array of textviews
body: <p>I am using textviews as a list, on click of each textview a fragment opens.
  I want to change the background of textview and its color when its clicked.
  Onclick of another textview, the previous background color and text color should change to its default color. I am using Butterknife to bind all the textviews into an array. </p>
  
  <p>Here is my code :</p>
  
  <pre><code>public class AccountMenuFragment extends Fragment {
  
  private accountMenuCallback callback;
  private boolean stateChanged;
  
  public AccountMenuFragment() {
      // Required empty public constructor
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setRetainInstance(true);
      try {
          callback = (accountMenuCallback) getActivity();
      } catch (ClassCastException e) {
          e.printStackTrace();
          throw new ClassCastException("Calling Activity/Fragment must implement DialogClickListener interface");
      }
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      View view = inflater.inflate(R.layout.fragment_my_account, container, false);
      ButterKnife.bind(this, view);
      return view;
  }
  
  @OnClick({R.id.rlAccount, R.id.rlBusiness, R.id.rlIndustry,
          R.id.rlVerification, R.id.rlBank, R.id.rlPersonal, R.id.rlPassword})
  public void changeColor(TextView textView) {
      stateChanged = !stateChanged;
      if (stateChanged) {
          // reset background to default;
          textView.setTextColor(getResources().getColor(R.color.text_color));
          textView.setBackgroundColor(Color.WHITE);
      } else {
          textView.setTextColor(Color.WHITE);
          textView.setBackgroundColor(getResources().getColor(R.color.text_color_blue));
      }
  }}
  </code></pre>
  
  <p>But it changes its color on double click of the same textview. But I want to change and restore the previous on a single click.</p>