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;
    }
    }
  • 相关阅读:
    linux c++ 实现http请求
    pip 换源
    Web API接口
    DRF框架知识总览
    jq+bs插件
    element-ui插件
    axios插件
    前端存储数据汇总
    Vuex插件
    全局配置css和js
  • 原文地址:https://www.cnblogs.com/wenfei123chai/p/4994366.html
Copyright © 2011-2022 走看看