Sto cercando di usare un frammento in un FragmentActivity in questo modo:FragmentActivity: non può lanciare da Frammento di classe derivata
TutViewerFragment viewer = (TutViewerFragment)
getSupportFragmentManager().findFragmentById(R.id.tutview_fragment);
E il mio TutViewerFragment
estende Fragment
. Tuttavia sto ricevendo un errore:
Cannot cast from Fragment to TutViewerFragment.
Realmente non capisco perché questo sta accadendo. Perché non può essere lanciato?
sei sicuro che TutViewerFragment stia estendendo Fragment? –
Sono positivo. Dai un'occhiata: http://pastie.org/3534066 –
Puoi incollare il tuo elemento xml? Anche quale pacchetto di compatibilità stai usando? –
Sid