title: Android : Java/Kotlin Calendar special appear
body: <p>I work in Calendar appears in ListView
  I have a refrence class for elements </p>
  
  <pre><code>internal class MyItem {
  var name: String? = null
  var number: String? = null
  var nameDay:String? = null
  </code></pre>
  
  <p>}</p>
  
  <p>In MainActivity i make ArrayList to save elements and get instance from calendar</p>
  
  <pre><code>private var arrayList: ArrayList&lt;MyItem&gt;? = null
  private var cal:Calendar= Calendar.getInstance()
  </code></pre>
  
  <p>and function call from onCreate to filled ArrayList like this </p>
  
  <pre><code>private fun loaddata() {
  </code></pre>
  
  <p>varible brings us exactly the number of days of the month </p>
  
  <pre><code>var maxDays:Int = cal.getActualMaximum(Calendar.DAY_OF_MONTH)
  </code></pre>
  
  <p>varible brings us a complete date</p>
  
  <pre><code>var today:Int = cal.get(Calendar.DATE)
  </code></pre>
  
  <p>some of FormatSimpleDate</p>
  
  <pre><code>var sdfDay:SimpleDateFormat = SimpleDateFormat("dd")
  var sdfNamDay:SimpleDateFormat = SimpleDateFormat("E")
  var sdfMonth:SimpleDateFormat = SimpleDateFormat("MMM")
  </code></pre>
  
  <p>then i make loop for 45 days</p>
  
  <pre><code>for( i in 0.. 45){
          val myItem = MyItem()
  
          myItem.name = sdfMonth.format(cal.time)
          myItem.number = sdfDay.format(cal.time)
          myItem.nameDay = sdfNamDay.format(cal.time)
          cal.add(Calendar.DATE,1)
          arrayList!!.add(myItem)
      }
  </code></pre>
  
  <p>The out put similar that</p>
  
  <pre><code>AUG Wed 30 / AUG Thu 31 / Sep Fri 01 / Sep Sat 02 / ... / Sep Sat 30 / Oct Sun 01 / Oct Mon 02 / etc
  </code></pre>
  
  <p>the function works perfectly without any error
  But i want to appears to me on the first row month-day
  in second row start to show just day until month change
  if month change to next 
  show in row month and day 
  in next row show day only
  Like this </p>
  
  <pre><code>AUG Wed 30 / Thu 31 / Sep Fri 01 / Sat 02 / ... / Sat 30 / Oct Sun 01 / Mon 02 / etc
  </code></pre>
  
  <p>i make more than one if statement<br>
  but not make good </p>
  
  <p>Can any body help me please</p>