title: Use card views as buttons
body: <p>On the home screen of my app i have a list of card views that i want to use as buttons to switch to their related fragment.</p>
  
  <p>i want to do it similar to this instead of writing a onclick method for every card.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>private void BottomNavigation_NavigationItemSelected(object sender, BottomNavigationView.NavigationItemSelectedEventArgs e)
              {
                  Fragment fragment = null;
                  
      
                  switch (e.Item.ItemId)
                  {
                      case Resource.Id.menu_home:
                          fragment = homeFragment;
                          break;
      
                      case Resource.Id.menu_favourites:
                          fragment = favFragment;
                          break;
      
                      case Resource.Id.menu_more:
                          fragment = moreFragment;
                          break;
                  }
      
                  FragmentTransaction fragmentTx = SupportFragmentManager.BeginTransaction();
                  fragmentTx.Replace(Resource.Id.container, fragment);
                  fragmentTx.Commit();
      
      
              }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am doing this inside the home fragment and my cardviews are the paceCard, wattsCard and weightadjustCard. So how can i implement this for my cards?</p>