Fragment :opening Activity From Fragment Giving Activitynotfoundexception:
I am trying to open an activity from Listfragment as below @Override public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l,
Solution 1:
Make sure that you have registered the Activity with full correct package name in the manifest
Solution 2:
Try the current class object using 'this' keyword to call your activity in the intent parameter .
Intent myIntent = new Intent(this.Urcurrentactivity, TravellerTimer.class); this.Urcurrentactivity.startActivity(myIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY));
Your code should also work but by just seeing this quotes, i cant make it sure .
Solution 3:
By seeing your code in PasteBin:
ArrayList<ActiveTimer> timerLists = new ArrayList<ActiveTimer>();
timerLists = ((TimerPrefrence) getApplication()).viewTimer();
you are trying to cast TimerPrefrence to an ActiveTimer ArrayList. That is the reason you are getting Class cast exception.
Post a Comment for "Fragment :opening Activity From Fragment Giving Activitynotfoundexception:"