title: Unable to implement custom calendar view library in android java
body: <p>I want to use this Calendar view in my android java app.
  <a href="https://github.com/kizitonwose/CalendarView" rel="nofollow noreferrer">https://github.com/kizitonwose/CalendarView</a></p>
  
  <p>I've tried myself first before coming here but I could not implement this in java as documentation is for Kotlin.</p>
  
  <p>Someone please help me, I am stuck on step 2.</p>
  
  <p>Step 2:</p>
  
  <p>Kotlin Code of Documentation:</p>
  
  <pre><code>class DayViewContainer(view: View) : ViewContainer(view) {
      val textView = view.calendarDayText
  }
  </code></pre>
  
  <p>My Java Equivalent Code:</p>
  
  <pre><code>class DayViewContainer extends ViewContainer {
  
      public DayViewContainer(View view) {
          super(view);
          final TextView calendar_day_text = view.findViewById(R.id.calendarDayText);
      }
  }
  </code></pre>
  
  <p>Kotlin Code of Documentation:</p>
  
  <pre><code>calendarView.dayBinder = object : DayBinder&lt;DayViewContainer&gt; {
      // Called only when a new container is needed.
      override fun create(view: View) = DayViewContainer(view)
      // Called every time we need to reuse a container.
      override fun bind(container: DayViewContainer, day: CalendarDay) {
          container.textView.text = day.date.dayOfMonth.toString()
      }
  }
  </code></pre>
  
  <p>My Java Equivalent Code:</p>
  
  <pre><code>calendarView.setDayBinder(new DayBinder&lt;DayViewContainer&gt;(){
  
      @Override
          public DayViewContainer create(View view) {
          return new DayViewContainer(view);
      }
  
      @Override
      public void bind(DayViewContainer dayViewContainer, CalendarDay calendarDay) {
          TextView textView = 
           dayViewContainer.getView().findViewById(R.id.calendarDayText);
          textView.setText(calendarDay.getDate().getDayOfMonth());
      }
  });
  </code></pre>