I am trying to write an android application but I am fairly new to this, and I'm having issues with selecting different fragments on different tabs. For example, when calling this block of code every tab ends up looking like "location_main.xml." Is there a way to differentiate the tab selected? Thanks!
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.location_main, container,false);
TextView textView = (TextView) rootView.findViewById(R.id.section_label);
//This is defining the text for the fragments, or tabs, at the given section number.
textView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
//This returns the View rootView
return rootView;
}