adapter and called notify
                  
                  
                  
                  
                  
                  what's wrong here?
                  
                  
                  
                  
                  
                  class HomeView(context: Context, swipeRefreshEnabled: Boolean = true) : HomeViewContract {
                  
                  
                  
                  
                  
                      override fun getRootView() = mRootView
                  
                  
                  
                  
                  
                      private val mRootView: View = context.inflate(R.layout.fragment_home)
                  
                  
                      private val adapter: HomeAdapter = HomeAdapter()
                  
                  
                      private val list: RecyclerView
                  
                  
                      private val swipe: SwipeRefreshLayout
                  
                  
                  //the problem must be here
                  
                  
                      init {
                  
                  
                          mAdapter = HomeAdapter()
                  
                  
                          this.list = mRootView.findViewById<RecyclerView>(R.id.home_recycler_view) as RecyclerView
                  
                  
                          list.adapter = mAdapter
                  
                  
                          var linearLayoutManager  = LinearLayoutManager(context)
                  
                  
                          linearLayoutManager.orientation= LinearLayoutManager.VERTICAL
                  
                  
                          list.layoutManager = linearLayoutManager
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                          this.swipe = mRootView.findViewById(R.id.home_swipe_refresh_div)
                  
                  
                          swipe.isEnabled = swipeRefreshEnabled
                  
                  
                      }
                  
                  
                
Please format the code you posted, by wrapping it in triple backticks. -> `
in logcat : RecyclerView: No adapter attached; skipping layout
Обсуждают сегодня