Insert a Canvas into a View + SwipeTabs
<p>I'm trying to create an app' which has pager. It's for a weather station. I want to draw a Canva here :</p>

<blockquote>
  <p>case 1:</p>
  
  <p>tabLayout = R.layout.tab2;</p>
  
  <p>break;</p>
</blockquote>

<p>Here is the code below : </p>

<blockquote>
  <p>@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,</p>

<pre><code>  Bundle args = getArguments();
  int position = args.getInt(ARG_OBJECT);

  int tabLayout = 0;
  switch (position) {
  case 0:
  tabLayout = R.layout.tab1;
  break;
  case 1:
  tabLayout = R.layout.tab2;
  break;
  case 2:
  tabLayout = R.layout.tab3;
  break;
  }

  View rootView = inflater.inflate(tabLayout, container, false);

  return rootView;
</code></pre>
  
  <p>}</p>
</blockquote>
