zoukankan      html  css  js  c++  java
  • The type new View.OnClickListener(){} must implement the inherited abstract method View.Onclicklis

    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;
    }
    }
  • 相关阅读:
    Shell IFS
    Crontab
    linux awk
    free
    条件语句练习2
    条件语句练习
    打印菜单
    条件测试语法
    read 命令
    jQuery(实例)
  • 原文地址:https://www.cnblogs.com/wenfei123chai/p/4994366.html
Copyright © 2011-2022 走看看