Hi! I have a card game I created in android and it is possible to show the scores at any given time by clicking a menu option. I would like that scores dialog to show a different background image when it's loaded depending on factors like who's leading, etc. In my constructor, I have the following relevant code:
public ScoresDialog(Context context) {
super(context);
this.setTitle(R.string.scoresDialogHeading);
setContentView(R.layout.scores_view);
...
}
I have tried getting that view to change it in the showDialog method i wrote like so:
findViewById(R.layout.scores_view).setBackgroundColor(Color.BLUE);
However, I got a NPE... I tried moving this statement to the onStart method, thinking that the view is not yet initialized but got the same error... Any thoughts on what the right way to do something like that is? Thanks, E.