How to open a new activity on itemclick in gridview.The below code not opening a new activity.Kindly help me -


// final arraylist<string> arr = new arraylist<string>();   arrayadapter<string> adapter = new arrayadapter<string>(this, android.r.layout.simple_list_item_1,r.id.textview1 ,prgmnamelist);   gv = (gridview) findviewbyid(r.id.gridview1);   textview1 = (textview) findviewbyid(r.id.textview1);   gv.setadapter(new customadapter(this, prgmnamelist, prgmimages));    gv.setonitemclicklistener(new adapterview.onitemclicklistener() {      public void onitemclick(adapterview<?> parent, view v, int position, long id) {       intent intent = new intent(getapplicationcontext(),englishactivity.class);       intent.putextra("id",v.getid());       intent.putextra("index",position);       startactivity(intent);     }   }); } 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -