mardi 5 juillet 2016

Application stopped error in android

I am a newbie.

I am getting "Application has stopped", error after pressing on Encrypt button (id=encb) (only name, for testing by Toast), in fragment_main.xml (Home).

Explanation: MainActivity.java, its layout, activity_main.xml (Its for already built in navigation bar). MainFragment.java, its layout, fragment_main.xml (Its for Home fragment in the navigation bar, from one of the fragments like Home, Settings etc.)

What I have tried: I have searched a lot for it on Internet. Checked my onClick function, it is correct.

Also as there is FragmentTransaction of the fragment_main (i.e., MainFragment), by activity_main. So, it means I have to put my onClick() in MainActivity.java instead of MainFragment.java.

Here is the code.

Every answer will be appreciated.

Aucun commentaire:

Enregistrer un commentaire