浏览 808 次
public class HistoryData extends Activity 
{
....
ExpandableListAdapter adapter = new BaseExpandableListAdapter()
{
....
public void A()
{
这里面怎么调用方法B??
}
}
.....
public void B(){.......}
}
2015-08-07 17:14
 
提问者采纳
 
在建立适配器的时候,传个context,初始化适配器的时候,把当前activity传进去。调用方法B的时候,context.B();

相关文章:

  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-01-10
  • 2022-12-23
相关资源
相似解决方案