错误提示:The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnClickListener(){}, String, int)
错误原由:在makeText的第一个参数Context指的是上下文对象,而此处上下文并不是该Activity:
Activity中:Toast.makeText(MainActivity.this, "已经到了第一周", Toast.LENGTH_SHORT).show() ;
Fragment或者其他中:Toast.makeText(getActivity(), "已经到了第一周", Toast.LENGTH_SHORT).show() ;
转自:http://blog.youkuaiyun.com/speedme/article/details/8041677