reference to XML file is not a member of the R file
- by yoavstr
how can i had to class layout in R another xml file ?
it should b autmatic as i had new resources to res but it's not
someone knows what i did wrong ?
i open an activity and now i want to open another activity that will work with another xml
example
i have menu and main.xml
now i want to go for anther activity called gamescreen using this method :
newGameButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
Intent i = = new Intent(this, gameScreen.class);
startActivity(i);
}
}
i want to move to another "page" to another activity called gameScreen which should b associated to the xml called gameScreen.xml
but in his onCreate :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gameScreen);
}
and gameScreen is not a member of the R file
please help me i am sitting for the last 4 hours felling like an idiot ...