Hi,
I created a template using the AndroidStudio. The app template I choosed to have an action bar. It created 3 sections with one fragment_main
here is the code was created:
[HIGH]public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
// TextView textView = (TextView) rootView.findViewById(R.id.section_label);
// textView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
return rootView;
}
[/HIGH]
I want to know how can I display different layout for every sections so home_section (0) will display fragment_main and contact_section (1) will show the fragment_contact?
Thanks,
Jassim
I created a template using the AndroidStudio. The app template I choosed to have an action bar. It created 3 sections with one fragment_main
here is the code was created:
[HIGH]public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
// TextView textView = (TextView) rootView.findViewById(R.id.section_label);
// textView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
return rootView;
}
[/HIGH]
I want to know how can I display different layout for every sections so home_section (0) will display fragment_main and contact_section (1) will show the fragment_contact?
Thanks,
Jassim