public abstract class AndroidTextAdvGame extends Activity implements Game {
Game game;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
game = this;
rightLinksListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
setScreen( new BookQuestGameScreen(game) );
}
};
}
Is there anyway I can reference ‘this’ ( the class I defined )
in the new View.OnClickListener ?
The current workaround is that game member I created, and assigning game=this in the onCreate and then using game in the new View.OnClickListener
If your class you defined was called AndroidTextAdvGame, then you would refer to its “this” by using