<分区>
请阅读以下代码中的2条注释。
public class Field extends LinearLayout {
public void init() {
setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
// I want to access the main object 'Field' here(not the class, the object)
}
});
// to be clear the object referred as 'this' from HERE should be accessed from where the above comment is.
}
}
这可能吗? 是否有从对象内部的函数访问主类对象的关键字?