Android : Trouble with listview in slide menu

on Sunday, August 31, 2014


I have a slide menu in my app and its work very good but i have a list view in slide menu only work in MainActivity and it is not work in other Activities but i copy all of codes about slide menu from MainActivity and it is same with other activities but OnItemClickListener Only work in MainActivity. Here is codes:



slidelist.setOnItemClickListener(new OnItemClickListener(){

@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
switch(position){
case 0:
DL.closeDrawers();
break;
case 1:
startActivity(new Intent(MainActivity.this, Settings.class));
finish();
break;
case 2:
startActivity(new Intent(MainActivity.this, Email.class));
break;
case 3:
Intent goToMarket = new Intent(Intent.ACTION_VIEW)
.setData(Uri.parse("http://cafebazaar.ir/app/com.seyedmehdi.scarystories/?l=fa"));
startActivity(goToMarket);
break;
case 4:
startActivity(new Intent(MainActivity.this, Manba.class));
break;
default:
break;
}

}
});


Please help. Sorry from my bad English.


0 comments:

Post a Comment