So I've been following this Android Tutorial (Youtube) by Derek Banas. Trying to learn to make a NavigationDrawer.
I run into onAttach() being deprecated. I looked at this Stack Overflow link but I'm a beginner in AS and can't understand if it's correct (mainly due to me not sure if I have to instantiate MTitle, mCalled, mHost,etc) and how I can possibly implement it, in my app.
onAttach code:
public void onAttatch(Activity activity) {
super.onAttach(activity);
((MainActivity)activity).onSectionAttached(1);
}
public void onSectionAttached(int number) {
switch(number) {
case 1:
mTitle = getString(R.string.title_section1);
break;
}