final ImageView patientAllergyImage = (ImageView) findViewById(R.id.image);
patientAllergyImage.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
patientAllergyImage.setImageDrawable(getResources().
getDrawable(R.drawable.nav_down_green));
List.setVisibility(View.GONE);
}
});
我正在制作要隐藏的列表,但是当我单击同一个按钮时如何显示它。我不能保持一个布尔值来检查它是否被点击,就像它说的那样......The final local variable clicked cannot be assigned, since it is defined in an enclosing type
既不是一个non
final
变量