I have a method that checks for an internet connection and depending on the state i want to provide different layouts
When there is an internet connection i want the layout to be
View rootView = inflater.inflate(R.layout.fragment_home, container, false);
when there is no connection i want it to be
View rootView = inflater.inflate(R.layout.fragment_null, container, false);
is it possible to do something like
View rootView = inflater.inflate(getstring(layoutchooser), container, false);
where layoutchooser is a defined String variable.