BaseAdapter class wont setAdapter inside Asynctask - Android

后端 未结 4 549
谎友^
谎友^ 2020-12-02 02:52

I have asynctask that gathers usernames, comments, and numbers. It places them into strings and is then suppose to call a BaseAdapter class, create an adapter, and set the a

4条回答
  •  眼角桃花
    2020-12-02 03:43

    I hope this might be help,

    onPostExecute include (Inside AsyncTask)

    ExampleAdapter sectionedAdapter = new EfficientAdapter(ClassInfoThread.this,getBaseContext()); listView.setAdapter(sectionedAdapter);

    and in your adapter class add this constructor

    public ExampleAdapter(ExampleThread exampleThread,Context context) { mInflater = LayoutInflater.from(context); }

    good luck.

    Nandakishore P

提交回复
热议问题