Question: I have a scenario, where I need some help working with RecyclerView. The workflow is as follows:

* The user taps on a TextView in RecyclerView adapter and on click, i
enable a button in Activity which was disabled earlier.
* On click on this enabled button, I want to change color of that particular position which was tapped.

Now what I have is an interface which provides the position on click of the TextView. What I really want to do is to have a function similar to this in my adapter:

```
public void changeColor(int position){
  //change background color of position
}

```

which then I can call from the activity `adapter.changeColor(position)`.

Can someone explain if this is possible or what can be the other ways to achieve this.

Answer: 
I assume that the code inside accessors and mutators you've shown is working. But you're using the wrong names. Rename these mutators and accessors:

```
setIssue_DateAttribute
setDue_DateAttribute
getIssue_DateAttribute
getDue_DateAttribute

```

To:

```
setIssueDateAttribute
setDueDateAttribute
getIssueDateAttribute
getDueDateAttribute

```
Change:

```
     $this->attributes['due_date'] = date('Y-m-d', strtotime($value) );

```

To:

```
     $this->attributes['due_date'] = Carbon::createFromFormat('dd/mm/Y', $value)->toDateTimeString();

```