java.lang.RuntimeException求救 你这Adapter是什么Adapter?? 是不是没有绑定好数据呢 ? 源码贴贴,然后排排版,看着太乱 . 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我猜,madapter是NULL 同意楼上, 建议看一下 madapter 是不是null, private SpeechListAdapter madapter=null;private class SpeechListAdapter extends BaseAdapter { public SpeechListAdapter(Context context) { mContext = context; } public int getCount() { return MAX_DAYNUM; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { 。。 return convertView; } private Context mContext; } 报nullpointer,说明此时madapter为null怎么在broadcast receiver之前,就把madapter给new了呢?望知道的朋友提示~~~ 因为貌似在Receiver的生命周期中,onReceiver函数是第一个被激发的,如果无法在这个函数中把madapter给new了的话,那么可能还有两个办法: 1. 重载receiver的构造函数,在构造函数里new madapter(貌似很少有人这么干的) 2. 把一个new好的madapter放进广播的intent里面,然后onreceive函数中要用的时候,把这个madapter取出来用。 这个是我能想到的办法,能不能行就不知道了,我的android水平连打个酱油都很呛 请教:如何快速的下载图片 急求小鱼在水里自由游动算法 android 4.0下横竖屏切换问题,请大神帮忙。。。 求助:android中AlertDialog无法显内容 菜鸟:关于GoogleMap的问题 Tab选项卡不能在虚拟机中运行,求大家帮忙解答 解答 如何控制Activity的跳转 android textview怎样实现文字跑马灯效果(垂直移动) eclipse 导入Android源码错误 新手新程序 初涉android,进来看看我这模拟器对不?? 添加自己的module到android framework源代码,然后build SDK的问题?
public SpeechListAdapter(Context context) {
mContext = context;
} public int getCount() {
return MAX_DAYNUM;
} public Object getItem(int position) {
return position;
} public long getItemId(int position) {
return position;
} public View getView(int position, View convertView, ViewGroup parent) {
。。
return convertView;
} private Context mContext;
}
怎么在broadcast receiver之前,就把madapter给new了呢?望知道的朋友提示~~~
1. 重载receiver的构造函数,在构造函数里new madapter(貌似很少有人这么干的)
2. 把一个new好的madapter放进广播的intent里面,然后onreceive函数中要用的时候,把这个madapter取出来用。
这个是我能想到的办法,能不能行就不知道了,我的android水平连打个酱油都很呛