reference to XML file is not a member of the R file
Posted
by yoavstr
on Stack Overflow
See other posts from Stack Overflow
or by yoavstr
Published on 2010-05-23T11:29:41Z
Indexed on
2010/05/23
11:40 UTC
Read the original article
Hit count: 177
android
|android-manifest
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 ...
© Stack Overflow or respective owner