title: recyclerview not showing under navigation drawer
body: <p>I am trying to create a browser having a navigation drawer and a recyclerView holding Tabs for new website. Navigation drawer pops out but recyclerview not showing.</p>
  <p>here's my <strong>adapter code</strong>:</p>
  <pre><code>class NavigationTabAdapter (context: Context, contentData:ArrayList&lt;Tab&gt;) :
      RecyclerView.Adapter&lt;NavigationTabAdapter.NavigationViewHolder&gt;() {
  
  var mcontext:Context?=null
  var contentList:ArrayList&lt;Tab&gt;?=null
  var tabInterface:TabInterface?=null
  
  init {
      mcontext=context
      contentList=contentData
      tabInterface=context as TabInterface
  }
  
  override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NavigationViewHolder {
      val itemView=LayoutInflater.from(parent.context).inflate(R.layout.row_custom_recycler_tab, parent, true)
      return NavigationViewHolder(itemView)
  }
  
  override fun onBindViewHolder(holder: NavigationViewHolder, position: Int) {
      holder.row_text?.setText(contentList?.get(position)?.url)
      holder.row_img_remove?.setOnClickListener {
           if (contentList!!.size&gt;1)
           {
            tabInterface?.deleteItem(contentList?.get(position)?.id!!,position)
           }
      }
  </code></pre>
  <p>here's my <strong>mainActivity xml</strong>:</p>
  <pre><code>enter code     //Navigation drawer
  var drawerLayout:DrawerLayout?=null
  var tabsDatabase:TabsDatabase?=null
  var navigationRecyclerView:RecyclerView?=null
  var navigationTabAdapter:NavigationTabAdapter?=null
  var listWebLinks:ArrayList&lt;Tab&gt;?=null
  var itemClickedPosition:Int=-1
  var idForClickedPosition:Int=-1
  var url:String?=null
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_main)
      val toolbar=findViewById&lt;Toolbar&gt;(R.id.appBar)
      setSupportActionBar(toolbar)
  
      drawerLayout=findViewById(R.id.drawer_layout)
      val toggle=ActionBarDrawerToggle(this@MainActivity,drawerLayout,toolbar,
              R.string.navigation_drawer_open,R.string.navigation_drawer_close)
  
      drawerLayout?.addDrawerListener(toggle)
      toggle.syncState()
  
      tabsDatabase= TabsDatabase(this)
      navigationRecyclerView=findViewById(R.id.nav_recycler_view)
      navigationRecyclerView?.layoutManager=LinearLayoutManager(this)
      navigationRecyclerView?.itemAnimator=DefaultItemAnimator()
      listWebLinks= ArrayList()
      
      searchView = findViewById(R.id.search_View)
      webview = findViewById(R.id.webImage)
      progressBar = findViewById(R.id.progressBar)
      inputMethodManager=getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
      mainScreen=findViewById(R.id.mainScreen)
  
  
      webview!!.settings.javaScriptEnabled = true
      webview!!.webViewClient = object :WebViewClient() {
          override fun shouldOverrideUrlLoading(view: WebView?,
                                                url:String
          ): Boolean {
              view!!.loadUrl(url)
              return true
          }
  
          override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
              super.onPageStarted(view, url, favicon)
              if (url.equals(&quot;about:blank&quot;))
              {
                  mainScreen?.visibility=View.VISIBLE
                  webview?.visibility
                  return
              }
  
              if (!(progressBar!!.isShown))
              {
                  progressBar?.visibility = View.VISIBLE
                  view!!.visibility=View.GONE
              }
              searchView!!.onActionViewExpanded()
              searchView!!.setQuery(webview!!.url,false)
              searchView!!.clearFocus()
          }
  
          override fun onPageFinished(view: WebView?, url: String?) {
              super.onPageFinished(view, url)
              if (progressBar!!.isShown)
              {
                  progressBar!!.visibility = View.GONE
                  view!!.visibility=View.VISIBLE
              }
              findViewById&lt;ImageView&gt;(R.id.backwardImage)!!.isEnabled=true
              findViewById&lt;ImageView&gt;(R.id.backwardImage)!!.setImageResource(R.drawable.undo_blue)
              if (!(webview!!.canGoForward()))
              {
                  findViewById&lt;ImageView&gt;(R.id.forwardImage)?.isEnabled=false
                  findViewById&lt;ImageView&gt;(R.id.forwardImage)?.setImageResource(R.drawable.redo_blue)
              }
              findViewById&lt;ImageView&gt;(R.id.homeImage)?.isEnabled=true
              findViewById&lt;ImageView&gt;(R.id.homeImage)?.setImageResource(R.drawable.home_orange)
              if (itemClickedPosition!=-1)
              {
              updateItem(idForClickedPosition,url)
              }
          }
      }
  
      searchView?.setOnQueryTextListener(object :SearchView.OnQueryTextListener{
          override fun onQueryTextSubmit(query: String): Boolean {
              try {
                  val bool:Boolean=URLUtil.isValidUrl(query)
  
                  if (bool)
                  {
                      webview!!.loadUrl(query)
                  }
                  else
                  {
                      webview!!.loadUrl(&quot;https://&quot;+query.replace(&quot;&quot;,&quot;&quot;))
                      findViewById&lt;LinearLayout&gt;(R.id.mainScreen).visibility = View.GONE
                  }
                  findViewById&lt;ImageView&gt;(R.id.backwardImage).isEnabled=true
                  findViewById&lt;ImageView&gt;(R.id.backwardImage).setImageResource(R.drawable.undo_orange)
                  findViewById&lt;ImageView&gt;(R.id.homeImage)?.isEnabled=true
                  findViewById&lt;ImageView&gt;(R.id.homeImage).setImageResource(R.drawable.home_orange)
                  inputMethodManager!!.hideSoftInputFromWindow(currentFocus?.windowToken,0)
              }
              catch (e:Exception)
              {
                  Toast.makeText(this@MainActivity,&quot;&quot;+e.printStackTrace(),Toast.LENGTH_SHORT).show()
              }
  
              return true
          }
  
          override fun onQueryTextChange(newText: String?): Boolean {
         return false
          }
  
      })
      try {
          listWebLinks = tabsDatabase?.readData()
          if (listWebLinks!!.size == 0)
          {
              tabsDatabase?.insertData(&quot;Home Page&quot;)
              listWebLinks = tabsDatabase?.readData()
              itemClickedPosition = 0
          } else {
              itemClickedPosition = listWebLinks!!.size - 1
          }
  
          navigationTabAdapter = NavigationTabAdapter(this, listWebLinks!!)
          navigationRecyclerView?.adapter = navigationTabAdapter
          navigationTabAdapter?.notifyDataSetChanged()
          navigationRecyclerView?.setHasFixedSize(true)
      } catch (e: Exception) {
          e.printStackTrace()
      }
  </code></pre>
  <p><strong>database file</strong></p>
  <pre><code>class TabsDatabase:SQLiteOpenHelper {
  
  constructor(context: Context) : super(context, DB_NAME, null, DB_VERSION)
  
  override fun onCreate(sqLiteDatabase: SQLiteDatabase?) {
      sqLiteDatabase?.execSQL(&quot;CREATE TABLE&quot; + TABLE_NAME + &quot;(&quot; + COL_ID +
      &quot; INTEGER PRIMARY KEY,&quot; + COL_URL + &quot;TEXT);&quot;)
  }
  
  override fun onUpgrade(sqLiteDatabase: SQLiteDatabase?, p1: Int, p2: Int) {
      sqLiteDatabase?.execSQL(&quot;Drop table IF EXISTS&quot; + TABLE_NAME)
  }
  
  fun insertData(url:String):Boolean?{
      var result = true
      try{
          val db= this.writableDatabase
          var cv=ContentValues()
          cv.put(COL_URL,url)
          db.insert(TABLE_NAME,null,cv)&gt;0
          db.close()
      }catch (e:Exception) {
          result = false
      }
          return result
      }
  fun updateData(id:Int,url:String):Boolean?{
          var result = true
          try{
              val db= this.writableDatabase
              var cv=ContentValues()
              cv.put(COL_URL,url)
              db.update(TABLE_NAME,cv, &quot;id=?&quot;, arrayOf(id.toString())) &gt;0
              db.close()
          }catch (e:Exception)
          {
              result= false
          }
      return true
  }
  fun readData():ArrayList&lt;Tab&gt;{
      var list=ArrayList&lt;Tab&gt;()
      var db=this.readableDatabase
      val query=&quot;select * from&quot; + TABLE_NAME + &quot;ORDER BY id ASC&quot;
      val result=db.rawQuery(query,null)
  
      if(result.moveToFirst())
      {
          do{
              var tab = Tab()
              tab.id=result.getInt(result.getColumnIndex(COL_ID).toInt())
              tab.url=result.getString(result.getColumnIndex(COL_URL))
              list.add(tab)
          }while (result.moveToNext())
      }
      result.close()
      db.close()
      return list
  }
  fun deleteData(id:Int) {
      val db=this.writableDatabase
      db.delete(TABLE_NAME, COL_ID + &quot;=&quot; +id,null)
      db.close()
  }
  </code></pre>