title: App doesn't display items on RecyclerView
body: <p>I'm new to android studio . I'm trying to display items in RecycleView but it's doesn't show anything.</p>
  <p>This is what android studio says:</p>
  <pre><code>
  E/RecyclerView: No layout manager attached; skipping layout
  </code></pre>
  <p>My Fragment :</p>
  <pre><code>public class Articles extends Fragment {
      View root;
      RecyclerView recyclerView;
      NewsList[] myListData = new NewsList[] {
              new NewsList(&quot;Article 1&quot;, &quot;Some Author&quot;),
              new NewsList(&quot;Article2&quot;, &quot;Some Author&quot;),
              new NewsList(&quot;Article3&quot;, &quot;Some Author&quot;),
  
      };
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
  
  
  
  
  
      }
      public View onCreateView(@NonNull LayoutInflater inflater,
                               ViewGroup container, Bundle savedInstanceState) {
          root = inflater.inflate(R.layout.fragment_articles, container, false);
          recyclerView = root.findViewById(R.id.recyclerView);
          NewsAdapter adapter = new NewsAdapter(myListData);
          recyclerView.setHasFixedSize(true);
          recyclerView.setAdapter(adapter);
  
  
          return root;
      }
  
  </code></pre>
  <p>Here is the code of my Adapter class :</p>
  <pre><code>public class NewsAdapter extends RecyclerView.Adapter&lt;NewsAdapter.ViewHolder&gt; {
      private NewsList[] listdata;
  
      // RecyclerView recyclerView;
      public NewsAdapter(NewsList[] listdata) {
  
          this.listdata = listdata;
      }
      @Override
      public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
          View listItem= layoutInflater.inflate(R.layout.list_item, parent, false);
          ViewHolder viewHolder = new ViewHolder(listItem);
          return viewHolder;
      }
  
      @Override
      public void onBindViewHolder(ViewHolder holder, int position) {
          final NewsList myListData = listdata[position];
          holder.textView1.setText(listdata[position].getTitle());
          holder.textView2.setText(listdata[position].getAuthor());
          holder.relativeLayout.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Toast.makeText(view.getContext(),&quot;click on item: &quot;+myListData.getTitle(),Toast.LENGTH_LONG).show();
              }
          });
      }
  
  
      @Override
      public int getItemCount() {
          return listdata.length;
      }
  
      public static class ViewHolder extends RecyclerView.ViewHolder {
          public TextView textView1;
          public TextView textView2;
          public RelativeLayout relativeLayout;
          public ViewHolder(View itemView) {
              super(itemView);
              this.textView1 = (TextView) itemView.findViewById(R.id.textView1);
              this.textView2 = (TextView) itemView.findViewById(R.id.textView2);
              relativeLayout = (RelativeLayout)itemView.findViewById(R.id.relativeLayout);
          }
      }
  </code></pre>
  <p>Previously I had an error where the app crashed when opened the fragment but now it's skips the RecyclerView.
  I will be gratefull if you help me to resolve this issue.</p>