title: OnItemClickListener on Fragment not work after exit from Activity
body: <p>I have a <strong>Fragment</strong> that display item using <strong>GridView</strong>. When the item get click it will open new <strong>Activity</strong> and bring some Intent key from the Fragment.</p>
  <blockquote>
  <p>The problem is after i return from Activity to Fragment GridView
  OnItemClickListener not working. Only work once for every button.</p>
  </blockquote>
  <p>It only work for the first time or i have go back to MainActivity and it will working again but only for once.</p>
  <p>Here is my Fragment Code :</p>
  <pre><code>public class MaulidFragment extends Fragment implements Constant {
      private Context context;
      private KitabAdapter adapter;
      private ArrayList&lt;KitabDataModel&gt; arrayList;
      private String kitab_jenis, kitab_judul, kitab_file;
      private GridView gridView;
  
      @Override
      public void onAttach(@NonNull Context context) {
          super.onAttach(context);
          this.context = context;
      }
  
      @Nullable
      @Override
      public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
          return inflater.inflate(R.layout.fragment_kitab_layout_gridview, container, false);
      }
  
      @Override
      public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
          super.onViewCreated(view, savedInstanceState);
          loadGridView(view);
      }
  
      @Override
      public void onSaveInstanceState(@NonNull Bundle outState) {
          super.onSaveInstanceState(outState);
  
      }
  
      private void loadGridView(View view) {
          gridView = view.findViewById(R.id.grid_view);
          arrayList = KitabData.getKitabData(context);
          adapter = new KitabAdapter(context, arrayList);
          gridView.setAdapter(adapter);
          adapter.filter(&quot;Maulid&quot;,&quot;&quot;);
          gridView.setOnItemClickListener((parent, view1, position, id) -&gt; {
              new AnimationUtils().pushdownAnimButtonKitab(view1);
  
              kitab_jenis = arrayList.get(position).getKitab_jenis();
              kitab_judul = arrayList.get(position).getKitab_judul();
              kitab_file = arrayList.get(position).getFile();
  
              Intent intent = new Intent(requireContext(), KitabBookPDF.class);
              intent.putExtra(pdf_file, kitab_file);
              intent.putExtra(toolbar_title, kitab_jenis + &quot; &quot; + kitab_judul);
              startActivity(intent);
          });
      }
  }
  </code></pre>
  <p>This is the Activity :</p>
  <pre><code>public class KitabBookPDF extends AppCompatActivity
          implements OnPageChangeListener, Constant {
  
      Toolbar toolbar;
      Integer pageNumber = 0;
      PDFView pdfView;
  
      // Intent
      Intent intent;
      Bundle extras;
  
      String pdfFile, toolbarTitle;
  
      long lastPress;
      Toast backpressToast;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.kit_pdfview);
          setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  
          getDataIntent();
  
          //PDF
          pdfView = findViewById(R.id.pdfView);
  
          // Toolbar setup
          toolbar = findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
          Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
          toolbar.setNavigationOnClickListener(view -&gt; onBackPressed());
  
          new PDFViewUtils().setPdfViewLocalFile(this, pdfView, pdfFile, pageNumber);
   }
  
      @Override
      public void onBackPressed() {
          long currentTime = System.currentTimeMillis();
          if (currentTime - lastPress &gt; backPressKitabPage) {
              backpressToast = Toast.makeText(getBaseContext(), getText(R.string.back_toast), Toast.LENGTH_LONG);
              backpressToast.show();
              lastPress = currentTime;
          } else {
              if (backpressToast != null) backpressToast.cancel();
              showInterstitial();
          }
      }
  
      public void onPageChanged(int page, int pageCount) {
          pageNumber = page;
          String judulhalaman = toolbarTitle;
          toolbar.setTitle(String.format(&quot;%s - %s / %s&quot;, judulhalaman, page + 1, pageCount));
      }
  
      private void getDataIntent(){
          intent = getIntent();
          extras = intent.getExtras();
  
          assert extras != null;
          pdfFile = extras.getString(pdf_file);
          toolbarTitle = extras.getString(toolbar_title);
      }
  
      @Override
      protected void onStop() {
          super.onStop();
          pdfView.destroyDrawingCache();
      }
  
      @Override
      protected void onDestroy() {
          super.onDestroy();
          pdfView.destroyDrawingCache();
      }
  }
  </code></pre>
  <p>What that i missing here. How to fix this?</p>