title: why cannot be cast FragmentActivity to androidx.fragment.app.FragmentActivity
body: <p>after updated android studio sdk 29 ,every dependency start x and every fragment is also x
  why cannot be cast to androidx.fragment.app.FragmentActivity</p>
  
  <p>holder.catImage.setOnClickListener(view -> {</p>
  
  <pre><code>        FragmentManager fragmentManager = ((FragmentActivity)context).getSupportFragmentManager();
          FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
  
          SubCategoryFragment subCategoryFragment = new SubCategoryFragment();
          Bundle bundle = new Bundle();
          bundle.putString("catId",arrayList.get(position).getId());
          bundle.putString("catname",arrayList.get(position).getName());
          Log.e("cbvhgfdsghd",arrayList.get(position).getId());
          subCategoryFragment.setArguments(bundle);
          fragmentTransaction.replace(R.id.main, subCategoryFragment);
          fragmentTransaction.addToBackStack("main");
          fragmentTransaction.commit();
  
  
      });
  </code></pre>
  
  <hr>
  
  <pre><code>2019-07-27 12:24:39.417 4307-4307/com.lgt.O7grocers E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.lgt.O7grocers, PID: 4307
      java.lang.ClassCastException: android.app.Application cannot be cast to androidx.fragment.app.FragmentActivity
          at com.lgt.O7grocers.Adapter.MainCatAdapter$1.onClick(MainCatAdapter.java:63)
          at android.view.View.performClick(View.java:6710)
          at android.view.View.performClickInternal(View.java:6668)
          at android.view.View.access$3400(View.java:797)
          at android.view.View$PerformClick.run(View.java:26450)
          at android.os.Handler.handleCallback(Handler.java:873)
          at android.os.Handler.dispatchMessage(Handler.java:99)
          at android.os.Looper.loop(Looper.java:226)
          at android.app.ActivityThread.main(ActivityThread.java:7172)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
  </code></pre>