title: Java.lang.ClassCastException error and app crashes
body: <p>Error Log I'm stuck here I've tried many solutions but same error </p>
  
  <pre><code>java.lang.ClassCastException: com.beauty.fashion.style.KidsNavigationDrawerActivity cannot be cast to com.beauty.fashion.style.interfaces.UpdateOrderTotal
          at com.beauty.fashion.style.adapters.CheckoutAdapter.&lt;init&gt;(CheckoutAdapter.java:38)
          at com.beauty.fashion.style.fragment.OrderConfirmationFragment.onCreateView(OrderConfirmationFragment.java:109)
  
  </code></pre>
  
  <p>This is my android code </p>
  
  <pre><code>
   public CheckoutAdapter(Context context, List&lt;ProductModel&gt; list) {
  
          this.context = context;
          this.list = list;
          inflater = LayoutInflater.from(context);
          callback = (UpdateOrderTotal) context;  //This is line 38 of CheckoutAdapter
          helper = new FashionDbHelper(context);
          utils = new CartUtils(context);
      }
  </code></pre>
  
  <p>This is where I'm getting products to cart list and app is crashing</p>
  
  <pre><code>if (utils.getCartList().getValue() != null) {
              cartList.addAll(utils.getCartList().getValue());
              if (cartList != null &amp;&amp; cartList.size() &gt; 0) {
                  linearEmptyCart.setVisibility(View.GONE);
                  cvGrandTotal.setVisibility(View.VISIBLE);
                  adapter = new CheckoutAdapter(getActivity(), cartList); //This is line 109 
                  rvConfirmOrder.setAdapter(adapter);
                  rvConfirmOrder.setLayoutManager(new LinearLayoutManager(getActivity()));
                  calculateTotal(cartList);
              } else {
                  linearEmptyCart.setVisibility(View.VISIBLE);
                  cvGrandTotal.setVisibility(View.GONE);
              }
          } else {
              cvGrandTotal.setVisibility(View.GONE);
              linearEmptyCart.setVisibility(View.VISIBLE);
          }
  </code></pre>