How to use a custom ArrayAdapter in a separate class?

后端 未结 2 759
太阳男子
太阳男子 2020-12-11 06:46

I have an inner class which extends ArrayAdapter in order to customize a ListView. I\'d like to break this inner class out into a separate file so other classes can use it

2条回答
  •  自闭症患者
    2020-12-11 07:17

    What about calling getLayoutInflater() on the context that is passed in.

    LayoutInflater inflater = ((Activity)context).getLayoutInflater();
    

提交回复
热议问题