title: Snackbar InflateException
body: <p>I was struggling because of studio complaining that <code>Dialog</code> is deprecated,
  so I went reading the documentation again, seems <code>Toast</code> is deprecated too.
  So I tried to migrate from <code>Toast</code> to <code>Snackbar</code>, but fail at the moment...I
  i added </p>
  
  <pre><code>implementation 'com.android.support:appcompat-v7:28.0.0'
  implementation 'com.android.support:design:28.0.0'
  </code></pre>
  
  <p>to my gradle dependencies to get access to the classes needed from the docu.</p>
  
  <p>I wrapped the original <code>LinearLayout</code> with a <code>CoordinatorLayout</code> changing my main layout to </p>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout
    android:id="@+id/myCoordinatorLayout"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;
  
    &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center"&gt;
  
      &lt;FrameLayout
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:id="@+id/shellView"
        android:padding="10dp"&gt;
     &lt;/FrameLayout&gt;
  &lt;/LinearLayout&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>then, in onCreate of the MainActivity i retrieve a reference to that <code>CoordinatorLayout</code></p>
  
  <pre><code> coordinatorView = findViewById(R.id.myCoordinatorLayout);
  </code></pre>
  
  <p>later in <code>onOptionsItemSelected</code>, in one of the menu points I am debugging:    </p>
  
  <pre><code>Snackbar mySnackbar = Snackbar.make(coordinatorView, "Launched import", Snackbar.LENGTH_LONG);
  mySnackbar.show();
  </code></pre>
  
  <p>as soon as those 2 lines are in, the app crashes:</p>
  
  <pre><code>android.view.InflateException: Binary XML file line #41: Binary XML file line #41: Error         inflating class android.widget.Button
      Caused by: android.view.InflateException: Binary XML file line #41: Error inflating class     android.widget.Button
      Caused by: java.lang.reflect.InvocationTargetException
          at java.lang.reflect.Constructor.newInstance0(Native Method)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
          at android.view.LayoutInflater.createView(LayoutInflater.java:647)
          at         com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
          at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
          at android.support.design.widget.Snackbar.make(Snackbar.java:188)
          at com.nohkumado.nohfibu.MainActivity.onOptionsItemSelected(MainActivity.java:187)
          at android.app.Activity.onMenuItemSelected(Activity.java:3450)
  </code></pre>
  
  <p>which xml file does it take? my main.xml has only 22 lines... and as displayed above, it has no buttons?? the centerview (shellview) is filled by a swappable Fragment that display the actual
  functionalty, it starts up with a simple TextView+EditView, so the Startupfragment can't be the culprit too, no buttons there....</p>
  
  <p>so any ideas welcome on how to solve this!</p>
  
  <p>as asked, i add the whole onOptionsItemSelected </p>
  
  <pre><code>@Override
  public boolean onOptionsItemSelected(MenuItem item)
  {
  FragmentManager fm = getFragmentManager();
  Log.d(TAG,"got item clicked "+item.getItemId());
  
  switch (item.getItemId())
      {
    case R.id.menuLsbook:
      Log.d(TAG,"starting up ls book frag");
      LsBookFragment lbook = new LsBookFragment().shell(shell);
      lbook.show(fm, getResources().getString(R.string.mlsbook));
      Log.d(TAG,"ls book running");
      break;
    case R.id.menuShowKpl:
      Log.d(TAG,"starting up kpl frag");
  
      EditorFrag editorFrag = (EditorFrag) fm.findFragmentByTag(KPLFRAG);
        if(editorFrag == null)
        {
          editorFrag = new EditKplFrag().shell(shell);
        }
        fm.beginTransaction().replace(R.id.shellView,editorFrag,KPLFRAG).commit();
      Log.d(TAG,"kpl running");
      break;
          case R.id.menuShowJrl:
              Log.d(TAG,"starting up jrl frag");
  
              editorFrag = (EditorFrag) fm.findFragmentByTag(JRLFRAG);
              if(editorFrag == null)
              {
                  editorFrag = new EditJrlFrag().shell(shell);
              }
              fm.beginTransaction().replace(R.id.shellView,editorFrag,JRLFRAG).commit();
              Log.d(TAG,"jrl running");
              break;
    case R.id.menu_import:
      Log.d(TAG,"selecting a source for importation of a new book book frag");
      ImportBookFragment ibook = new ImportBookFragment().shell(shell);
      //ibook.show(fm, getResources().getString(R.string.mlsbook));
      Log.d(TAG,"import book running");
      Snackbar mySnackbar = Snackbar.make(coordinatorView, "Launched import", Snackbar.LENGTH_LONG);
      mySnackbar.show();
  
      break;
  
    case R.id.menu_show_shell:
      Log.d(TAG,"starting shell frag");
      ShellFragment shellfrag = (ShellFragment) fm.findFragmentByTag(SHELLFRAG);
      if (shellfrag == null)
      {
        //Log.d(TAG, "no shell frag");
        shellfrag = new ShellFragment();
        shellfrag.callback(this);
        fm.beginTransaction().add(R.id.shellView, shellfrag, SHELLFRAG).commit();
        //Log.d(TAG, "shellfrag added");
        if(shell != null) shellfrag.shell(shell);
      }//if (shellfrag == null)
      shell = shellfrag.shell();
      Log.d(TAG,"shell displaying");
      break;
  
  
    case R.id.menu_settings:
              Log.d(TAG, "case is settings, creating intent");
              //Intent intent = new Intent();
              //intent.setClassName(this, "com.nohkumado.nohfibu.SettingsActivity");
              Intent intent = new Intent(this, SettingsActivity.class);
              startActivity(intent);
              //startActivityForResult(i, RESULT_SETTINGS);
              Log.d(TAG, "fired intent");
              break;
          case R.id.mabout:
              AboutDialogFragment about = new AboutDialogFragment();
              about.setVersion(new VersionCommand(shell).execute());
              about.show(fm, getResources().getString(R.string.mabout));
              break;
    case R.id.menu_manual:
      about = new AboutDialogFragment();
      about.setVersion(new VersionCommand(shell).execute());
      about.show(fm, getResources().getString(R.string.empty));
      break;
      }
  
      return true;
  }
  </code></pre>