public class MainActivity extends Activity {
protected Button startBrew = null; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
startBrew = (Button) findViewById(R.id.brew_start);
startBrew.setOnClickListener(new StartButtonListener());
} class StartButtonListener implements android.view.View.OnClickListener {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
findViewById(R.id.textView0).setBackgroundColor(Color.BLUE);
}
} @Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}

The type new View.OnClickListener(){} must implement the inherited abstract method View.Onclicklis的更多相关文章

  1. must implement the inherited abstract method DialogInterface.OnClickListener.onClick(DialogInterface, int)问题

    依照视屏编写代码如下 class MyButtonListener implements OnClickListener{ @Override public void onClick(View v){ ...

  2. must implement the inherited abstract method

    The type VideoView must implement the inherited abstract method MediaController.MediaPlayerControl.g ...

  3. JAVA-错误The type BookServiceImpl must implement the inherited abstract method

    错误原因 :是因为class继承了其他的类,没有导入过来,选择add unimplemented methods进行解决

  4. android-xxxx must implement the inherited abstract method报错

    public class ContactMainFragment extends Fragment implements OnClickListener { 提示:ContactMainFragmen ...

  5. The method onClick(View) of type new View.OnClickListener(){} must override a superclass

    最近在做一个jWebSocket Android客户端的Demo时遇到如下错误: ok —————— 最近在做一个jWebSocket Android客户端的Demo时遇到如下错误: ".. ...

  6. onClick(View) of type new View.OnClickListener(){} must override a superclass method

    原地址:http://blog.csdn.net/aeolus1019/article/details/8014798 Android开发过程中代码错误报错如下: - implements andro ...

  7. eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method

    在做arcgis android开发的时候,突然遇到这种错误,The method onClick(View) of type new View.OnClickListener(){} must ov ...

  8. The method setOnClickListener(View.OnClickListener) in the type View is not applicable

    开始学习 android 了,学习的是高明鑫老师的android视频教程(android视频教学). 学到第八讲时, 在写动态设置时报错: The method setOnClickListener( ...

  9. The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnClickListener(){}, String, int)

    package comxunfang.button; import android.support.v7.app.ActionBarActivity; import android.os.Bundle ...

随机推荐

  1. PHP与WCF第一次亲密接触

    接触PHP第二天,要求PHP访问WCF服务 着实痛苦,无从下手啊. 在网上查了很多资料知道PHP访问WCF很方便 <?php $client = new SoapClient ( 'http:/ ...

  2. js禁止滚动条滚动,并且滚动条不消失,页面大小不变

    //禁止滚动条滚动 function unScroll() { var top = $(document).scrollTop(); $(document).on('scroll.unable',fu ...

  3. nodejs shell

    REPL (Read-eval-print loop),即输入—求值—输出循环.如果你用过 Python,就会知道在终端下运行无参数的 python 命令或者使用 Python IDLE 打开的 sh ...

  4. Python基础--高速改造:字符串

    Python的字符串值得一说. 先看: >>>"Hello world!" 'Hello world!' 我们写是双引號,可是打印出来后是单引號. 差别何在? 答 ...

  5. 如何使用IVT BlueSoleil 如何在电脑上使用蓝牙耳机

    1 确保电脑上有蓝牙适配器 (现在很多电脑是不配蓝牙的),如果没有,网上买个蓝牙适配去,十几块钱很便宜.好了之后装一个下面这个软件,然后搜索蓝牙耳机,下面的状态栏就是"搜索设备" ...

  6. FZU 2168 防守阵地 I(公式推导)(经典)(中等)

    Problem 2168 防守阵地 I Accept: 377    Submit: 1280 Time Limit: 3000 mSec    Memory Limit : 32768 KB  Pr ...

  7. POJ 题目3667 Hotel(线段树,区间更新查询,求连续区间)

    Hotel Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 13805   Accepted: 5996 Descriptio ...

  8. android自己定义控件系列教程-----仿新版优酷评论剧集卡片滑动控件

    我们先来看看优酷的控件是怎么回事? 仅仅响应最后也就是最顶部的卡片的点击事件,假设点击的不是最顶部的卡片那么就先把它放到最顶部.然后在移动到最前面来.重复如次. 知道了这几条那么我们就非常好做了. 里 ...

  9. linux文档权限

    1.登录 root 用户:su - mac一开始进入创建的用户是具有管理员权限的用户,但是密码却不是进入 root 用户的密码,可以使用 sudo su - 免密进入 root 用户. 2.退出 ro ...

  10. Set的非重复判断是根据什么判断的

    HashSet 首先来看下HashSet的add()这个方法的源代码: public boolean add(E e) { return map.put(e, PRESENT)==null; } 由此 ...