content: package com.frogobox.apprecycler.core;
  /*
   * Created by faisalamir on 01/03/22
   * FrogoRecyclerView
   * -----------------------------------------
   * Name     : Muhammad Faisal Amir
   * E-mail   : faisalamircs@gmail.com
   * Github   : github.com/amirisback
   * -----------------------------------------
   * Copyright (C) 2022 Frogobox Media Inc.
   * All rights reserved
   *
   */
  
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.Toast;
  
  import androidx.annotation.NonNull;
  import androidx.annotation.Nullable;
  import androidx.appcompat.app.AppCompatActivity;
  
  public abstract class BaseJavaActivity<VB> extends AppCompatActivity {
  
      protected VB binding;
  
      public abstract VB setupViewBinding();
  
      @Override
      protected void onCreate(@Nullable Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          binding = setupViewBinding();
      }
  
  
      protected void setupDetailActivity(String title) {
          getSupportActionBar().setTitle(title);
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      }
  
      @Override
      public boolean onCreateOptionsMenu(@NonNull Menu menu) {
          return super.onCreateOptionsMenu(menu);
      }
  
      @Override
      public boolean onOptionsItemSelected(@NonNull MenuItem item) {
          if (item.getItemId() == android.R.id.home) {
              finish();
              return true;
          } else {
              return super.onOptionsItemSelected(item);
          }
      }
  
      protected void showToast(String message) {
          Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
      }
  }
  