Skip to content

Instantly share code, notes, and snippets.

@tehcpu
Created June 6, 2015 20:27
Show Gist options
  • Save tehcpu/4f4a24a9c6fd353badaa to your computer and use it in GitHub Desktop.
Save tehcpu/4f4a24a9c6fd353badaa to your computer and use it in GitHub Desktop.
shiet
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView;
Bundle args = getArguments();
int currentView = args.getInt(ARG_SECTION_NUMBER)-2;
if (currentView == 0) {
rootView = inflater.inflate(R.layout.fragment_landing, container, false);
}else if(currentView == 1){
rootView = inflater.inflate(R.layout.fragment2_landing, container, false);
}else {
rootView = inflater.inflate(R.layout.fragment_landing, container, false);
}
return rootView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment