title: How to get Access of a Recycler View's layout in an Activity (base java file)?
body: <blockquote>
    <p>Here is my Layout (fragment_hadees.xml) : </p>
  </blockquote>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
  
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".Hadees"&gt;
  
  
      &lt;androidx.recyclerview.widget.RecyclerView
          android:layout_width="match_parent"
          android:id="@+id/myrecyclerview"
          android:layout_height="match_parent"/&gt;
  
      &lt;com.google.android.material.floatingactionbutton.FloatingActionButton
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/fab"
          android:layout_alignParentEnd="true"
          android:layout_alignParentBottom="true"
          android:elevation="40dp"
          android:layout_margin="30dp"
         android:backgroundTint="#ffffff"
          android:src="@drawable/favorited"/&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <blockquote>
    <p>Here is the Hadees.java (root java file) :</p>
  </blockquote>
  
  <pre><code>   @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
  
      View root = inflater.inflate(R.layout.fragment_hadees, container, false);
     ((MainActivity) getActivity()).getSupportActionBar().setTitle("Hadees");
  
     HadeesAdapter hadeesAdapter;
     fab= root.findViewById(R.id.fab);
      ImageView copybutton= root.findViewById(R.id.copybutton);
      final TextView textView=root.findViewById(R.id.textView);
      ImageView whatsapText=root.findViewById(R.id.whatsApp_txt);
  
  
      toggleModelList= new ArrayList&lt;&gt;();
  
      fab.setOnClickListener(new View.OnClickListener() {
         @Override
         public void onClick(View view) {
            Toast.makeText(getActivity(), "FAB", Toast.LENGTH_SHORT).show();
  
  
         }
      });
  
  
      myrecyclerview=(RecyclerView)root.findViewById(R.id.myrecyclerview);
      myrecyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
  </code></pre>
  
  <blockquote>
    <p>Here is my hadees_contents.xml:</p>
  </blockquote>
  
  <pre><code> &lt;LinearLayout
      android:id="@+id/l1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
  
      &lt;TextView
          android:id="@+id/textView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:layout_margin="10dp"
          android:textIsSelectable="true"
          android:textColor="#000000"
          android:gravity="center"
          android:maxLines="100"
          android:fontFamily="sans-serif-condensed-medium"
          android:text="This is Arabic Text"
          android:textSize="20sp" /&gt;
  
      &lt;View
          android:layout_width="match_parent"
          android:layout_height="1dp"
          android:layout_marginTop="2dp"
          android:layout_marginBottom="2dp"
          android:background="@android:color/darker_gray" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/l2"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="6dp"
          android:layout_marginBottom="6dp"
          android:weightSum="4"&gt;
  
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:id="@+id/copybutton"
              android:src="@drawable/ic_content_copy_black_24dp" /&gt;
  </code></pre>
  
  <blockquote>
    <p>How can I get Access to the the Views in the hadees_contents.xml in Hadees.java ?
    I have the access to FAB but not to the contents of Recycler's View inflated layout ,which is hadees_contents.xml</p>
  </blockquote>