diff --git a/README.md b/README.md
index e032137..40565ee 100644
--- a/README.md
+++ b/README.md
@@ -23,18 +23,22 @@ Declare a DayPickerView inside your layout XML file:
``` xml
-
-
+
+
```
Next, you have to implement `DatePickerController` in your Activity or your Fragment. You will have to set `getMaxYear` and `onDayOfMonthSelected`. The first one is the max year between the current one and this maxYear. The second one is called every time user selects a new date.
``` java
+public class MyFragment extends Fragment implements DatePickerController {
+
+...
+
@Override
public int getMaxYear()
{
@@ -44,11 +48,20 @@ Next, you have to implement `DatePickerController` in your Activity or your Frag
@Override
public void onDayOfMonthSelected(int year, int month, int day)
{
- Log.e("Day Selected", day + " / " + month + " / " + year);
+ Log.d("Day Selected", day + " / " + month + " / " + year);
}
+ ...
+
+ }
```
+Finally, in `onCreate` or `onCreateView` method of your Activity or Fragment respectively, set the controller.
+
+``` java
+DayPickerView dayPickerView = (DayPickerView) findViewById(R.id.pickerView);
+dayPickerView.setController(this);
+```
---
### Customization