title: Is it possible to set a URL image on the tablayout icon?
body: <p>I have a tablayout on HomeActivity, and it has a static icon. I would like to know if it is possible and how to make so that in this icon, the user's photo is shown. It comes through a URL.</p>
  
  <p>Here is the code for Activity:</p>
  
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
  
      setSupportActionBar(binding.toolbar)
  
      binding.search.setOnClickListener(object : View.OnClickListener {
          override fun onClick(p0: View?) {
              startActivity(Intent(this@HomeActivity, SearchActivity::class.java))
          }
      })
  
      binding.tabLayout.addTab(binding.tabLayout.newTab().setIcon(R.drawable.ic_message_24dp))
      binding.tabLayout.addTab(binding.tabLayout.newTab().setIcon(R.drawable.ic_history_24dp))
      binding.tabLayout.addTab(binding.tabLayout.newTab().setIcon(R.drawable.ic_people_24dp))
      binding.tabLayout.addTab(binding.tabLayout.newTab().setIcon(R.drawable.ic_settings_24dp))
  
      pagerAdapter = HomePagerAdapter(supportFragmentManager, binding.tabLayout.tabCount)
  
      binding.viewPager.adapter = pagerAdapter
      binding.viewPager.addOnPageChangeListener(TabLayout.TabLayoutOnPageChangeListener(binding.tabLayout))
      binding.tabLayout.setOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
          override fun onTabSelected(tab: TabLayout.Tab) {
              binding.viewPager.currentItem = tab.position
          }
  
          override fun onTabUnselected(tab: TabLayout.Tab) {}
          override fun onTabReselected(tab: TabLayout.Tab) {}
      })
  
      //registerMessagesObserver()
      if (savedInstanceState == null) {
  
      }
  }
  </code></pre>
  
  <p>The icon in question would be the <code>binding.tabLayout.addTab (binding.tabLayout.newTab().SetIcon(R.drawable.ic_settings_24dp))</code></p>