Android - Linkify Problem

跟風遠走 提交于 2019-12-01 19:20:27

Turns out the answer to this is a lot simpler than I had originally thought. The problem was that when I was passing the context to my custom adapter I was passing the getApplicationContext() which is not the same as using the this identifier.

INCORRECT WAY:

Context mContext = getApplicationContext();
CustomAdapter mAdapter = new CustomAdapter( 
                mContext,
                itemList); 

CORRECT WAY:

CustomAdapter mAdapter = new CustomAdapter( 
                this,
                itemList); 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!