title: How to populate RecyclerView from string resource
body: <p>I'm getting string <code>id</code> instead of string value in <code>recyclerview</code>.</p>
  
  <p>Below is my code, I don't know where i'm getting it wrong.</p>
  
  <pre><code>public class Albert_Einstein_Fragment extends Fragment {
  private String b;
  
  String[] dataArray ={String.valueOf(R.array.albert_array)};
  
  //...
  
  private class QuoteAdapter extends RecyclerView.Adapter&lt;QuoteHolder&gt;{
      private String[] dataSource;
      public QuoteAdapter(String[] dataArgs){
          dataSource = dataArgs;
  
      }
      @Override
      public QuoteHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
          View view = layoutInflater
                  .inflate(R.layout.list_quotes, parent, false);
          return new QuoteHolder(view);
      }
  
  
  
      @Override
      public void onBindViewHolder(QuoteHolder holder, int position) {
          holder.mTaskNameTextView.setText(dataSource[position]);
      }
  
  
      @Override
      public int getItemCount() {
          return dataSource.length;
      }
  }
  }
  }
  </code></pre>
  
  <p>Below is part of my array string resource code...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;string-array name="albert_array"&gt;
      &lt;item&gt;Let every man be respected as an individual and no man idolized.   &lt;/item&gt;
      &lt;item&gt;God does not play dice. &lt;/item&gt;
      &lt;item&gt;Great spirits have always encountered violent opposition from mediocre minds.&lt;/item&gt;
      &lt;item&gt;Only a life lived for others is a life worthwhile.&lt;/item&gt;
      &lt;item&gt;We shall require a substantially new manner of thinking if mankind is to survive.&lt;/item&gt;
      &lt;item&gt;I used to go away for weeks in a state of confusion.&lt;/item&gt;
  &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Below is the output of my code</p>
  
  <pre><code>2131427328
  </code></pre>
  
  <p>Instead of list of strings in my array string resource</p>