How to change text color when click item of RecylerView in android
<p>This is Adapter!</p>

<pre><code>public class CategoryAdapter extends RecyclerView.Adapter&lt;CategoryAdapter.CategoryAdapterObjectHolder&gt; {
private static String LOG_TAG = "CategoryAdapter";
private List&lt;Category&gt; mCategory;
private static MyClickListener myClickListener;

public static class CategoryAdapterObjectHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    TextView mTextTitle;

    public CategoryAdapterObjectHolder(View itemView) {
        super(itemView);
        mTextTitle = (TextView) itemView.findViewById(R.id.text_menu);
        DebugTool.logD(LOG_TAG + "Adding Listener");
        itemView.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        myClickListener.onItemClick(getPosition(), v);
    }
}

public void setOnItemClickListener(MyClickListener myClickListener) {
    this.myClickListener = myClickListener;

}

public CategoryAdapter(List&lt;Category&gt; myHistoryData) {
    mCategory = myHistoryData;
}


@Override
public CategoryAdapter.CategoryAdapterObjectHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = LayoutInflater.from(parent.getContext())
            .inflate(R.layout.item_menu, parent, false);
    CategoryAdapterObjectHolder dataObjectHolder = new CategoryAdapterObjectHolder(view);
    return dataObjectHolder;
}

@Override
public void onBindViewHolder(CategoryAdapter.CategoryAdapterObjectHolder holder, int position) {

    holder.mTextTitle.setText(mCategory.get(position).getName());


}

public void addItem(Category dataObj, int index) {
    mCategory.add(dataObj);
    notifyItemInserted(index);
}

public void deleteItem(int index) {
    mCategory.remove(index);
    notifyItemRemoved(index);
}

@Override
public int getItemCount() {
    return mCategory.size();
}


public interface MyClickListener {
    public void onItemClick(int position, View v);
  }
}                               
</code></pre>

<p>This is OnItemClick</p>

<pre><code>  @Override
public void onResume() {
    super.onResume();
    ((CategoryAdapter) adapter).setOnItemClickListener(
            new CategoryAdapter.MyClickListener() {
                @Override
                public void onItemClick(int position, View v) {
                    TextView mTextItem = (TextView) v.findViewById(R.id.text_menu);
               //     mTextItem.setTextColor(getResources().getColor(R.color.color_text_white));
                    if (position == 0) {
                       Utils.showToast(getContext(), "POSITION 0");
                    } else if (position == 1) {
                        Utils.showToast(getContext(), "POSITION 1");
                    } else if (position == 2) {

                        Utils.showToast(getContext(), "POSITION 2");
                    } else if (position == 3) {

                        Utils.showToast(getContext(), "POSITION 3");
                    } 
                }
            });
}
</code></pre>

<p>My item it have colour white. </p>

<p>I want when :</p>

<p>I click at position == 0. </p>

<p>Text Color item of position == 0  change to dark. and position different have colour white.</p>

<p>I click position == 1 : </p>

<p>Text colour item of position == 1 change to colour dark. And position different back colour white.</p>

<p>I click position == 2 :</p>

<p>Text colour of position == 2 change to Dark and position different back colour white.</p>

<p>I click position == 3 :</p>

<p>Text colour of position == 3 change to Dark and position different back colour white.</p>

<p>Please. Help me!</p>