title: Trouble with GridView Adapter
body: <p>My GridView Adapter, need add in gridView item only one picture</p>
  <pre><code>class GridPhotoAdapter(context: Context) : BaseAdapter() {
      private var imageArrayList = arrayOf(
          com.example.b_my_friend.R.mipmap.ic_launcher)
  
      private lateinit var inflater: LayoutInflater
      private val context: Context = context
  
      override fun getCount(): Int {
          return imageArrayList.size
      }
      override fun getItem(position: Int): Any {
          return imageArrayList[position]
      }
  
      override fun getItemId(position: Int): Long {
          return imageArrayList[position].toLong()
      }
  
      override fun getView(position: Int, convertView: View, parent: ViewGroup?): View {
          var view: View = convertView
          if (inflater == null){
              inflater = context!!.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
          }
          if (view == null) {
              view = inflater.inflate(com.example.b_my_friend.R.layout.item_grid_photo, null)
          }
  
          view.photo.setImageResource(imageArrayList[position])
          view
      }
  
  }
  </code></pre>
  <p>and when i initialize in MainFragment</p>
  <pre><code>val gridPhotoAdapter = GridPhotoAdapter(activity!!)
  gridPhoto.adapter = gridPhotoAdapter
  </code></pre>
  <p>i catch error i dont know why</p>
  <p>gridPhoto must not be null</p>
  <p>How solve this error?</p>
  <p>fragment_photo.xml with my GridView(gridPhoto)</p>
  <pre><code>&lt;LinearLayout
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.ui.page.PhotoFragment&quot;&gt;
      &lt;GridView
          android:id=&quot;@+id/gridPhoto&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:columnWidth=&quot;30dp&quot;
          android:numColumns=&quot;3&quot;
          android:stretchMode=&quot;columnWidth&quot;/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>