What is this ? how solve

LayoutInflater.inflate returns a View. You need to cast it to the expected type (or use findViewById with a suitably typed receiver). Btw. you invoke the wrong function, you need the three parameter version and pass false to the attachToParent parameter as Listview takes care of that (better yet use RecyclerView - but the same is true in that case)