In the fragments video, public void onAttach(Activity activity) is used to attach the fragments in the mainactivity. But this method is deprecated. What should I replace the code with?
OnAttach function deprecated. Replacement?
Post a Reply
|Oldest Newest Rating|
Rajani Krishna Turlapati
· August 28, 2015
Deprecated method is not creating any problem. I ran the code with that. The actual bug was with Onclick method inside the new View.OnClickListener(). Onclick is not overriden but written manually. When I pressed Alt insert overrode the onclick method, it ran.
Java / Android Development
Very popular language used to create desktop applications, website applets, and Android apps.
|Bucky Roberts Administrator|