請問 使用 Android Studio 來寫的話 應該怎麼修改
package com.example.user.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
private Button bt1;
private Button bt2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bt1 =(Button) findViewById(R.id.button1);
bt1 =(Button) findViewById(R.id.button2);
bt1.setOnClickListener(new oit(){
@Override
public void onClick(View v){
super.onClick(v);
Toast.makeText(MainActivity.this,"bt1要執行的邏輯",1).show();
}
});
}
}
class oit implements View.OnClickListener{
@Override
public void onClick(View v){
Log.i("tag","父類的onclick事件")
}
}
=======
請問紅箭頭處 怎麼一直錯誤