不适用于参数(MainActivity.Listview1Adapter字符串)



我有一个类QuranArabUtils

public class QuranArabicUtils {
public static Spannable getTajweed(Context context, String s) {
}
}               

这是适配器listview

@Override
public View getView(final int _position, View _v, ViewGroup _container) {
LayoutInflater _inflater = getLayoutInflater();
View _view = _v;
if (_view == null) {
_view = _inflater.inflate(R.layout.tet, null);
}

final LinearLayout linear1 = _view.findViewById(R.id.linear1);
final TextView textview1 = _view.findViewById(R.id.textview1);


textview1.setText(QuranArabicUtils.getTajweed(this, aYat.get((int)_position).get("a").toString()));


return _view;
}

我调用argument到

textview1.setText(QuranArabicUtils.getTajweed(this, aYat.get((int)_position).get("a").toString()));

如何在类QuranArabUtils连接参数getTajweed()到listview适配器?我得到了错误"类型QuranArabicUtils中的方法getTajweed(Context, String)不适用于参数(MainActivity。Listview1Adapter,字符串)">

我得到答案了

你必须替换

textview1.setText(QuranArabicUtils.getTajweed(this, aYat.get((int)_position).get("a").toString()));

textview1.setText(QuranArabicUtils.getTajweed(getApplicationContext(), aYat.get((int)_position).get("a").toString()));

相关内容

  • 没有找到相关文章

最新更新