I want to link the activity from main activity in list view to other activity using intent.
When i linked it using intent and direct the result to the frame layout that has id (R.id.main
) in mainactivity ,it happens a problem.
Any one can help me?
The problem StartActivity (intent, R.id.main
)
String [] menus=getResources().getStringArray(R.array.menus);
//currently selected river
data=menus[pos];
if (data.equals("One")) {
Intent intent = new Intent(MainActivity.this, Home.class);
startActivity(intent,R.id.main);
}
else if (data.equals("Two")) {
Intent in = new Intent(MainActivity.this, Page1.class);
startActivity(in,R.id.main);
}
else if(data.equals("Three")){
Intent inte = new Intent(MainActivity.this, Page2.class);
startActivity(inte,R.id.main);
}