Hi i am very new for android in my app i have created Two fragments they are "MenuFragment" and "TextFragment" ok that's fine
But in my TextFragment i have one Method so that i want call that method from my MenuFragment class
public void change(String txt, String txt1) method i want to call from my MenuFragment
how can i do this please help me some
TextFragment:-
public class TextFragment extends Fragment {
TextView text,vers;
@Override
public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState) {
return view;
}
public void change(String txt, String txt1){
text.setText(txt);
vers.setText(txt1);
}
}
MenuFragment:-
public class MenuFragment extends Fragment {
String[] AndroidOS = new String[]{"Cupcake", "Donut", "Eclair", "Froyo", "Gingerbread", "Honeycomb", "Ice Cream SandWich", "Jelly Bean", "KitKat", "Jelly Bean", "KitKat"};
String[] Version = new String[]{"1.5", "1.6", "2.0-2.1", "2.2", "2.3", "3.0-3.2", "4.0", "4.1-4.3", "4.4", "4.1-4.3", "4.4"};
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
}
}