抱歉,这里是新手 android dev,我试图理解为什么 eclipse 希望我的 TextView 被声明为 final。
TheStack theStack = new TheStack(10);
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView display = (TextView) findViewById(R.id.tv1);
Button b0 = (Button) findViewById(R.id.b0);
b0.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
theStack.push("0");
display.setText(theStack.getStack());
}
});
}