title: RecyclerView GridLayoutManager: span count is defaulted to 1
body: <p>Although I'm defining the gridlayoutmanager span count as 2.. only one column is the result of emulator. I tried changing the width of card in XML but no good there..
  MainActivity:</p>
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      pb = (ProgressBar) findViewById(R.id.pb1);
      pause = (ImageButton) findViewById(R.id.pause);
      refresh = (ImageButton) findViewById(R.id.refresh);
      sb = (SeekBar) findViewById(R.id.seekBar);
      pause.setVisibility(pause.INVISIBLE);
      sb.setVisibility(sb.INVISIBLE);
      mediaPlayer = new MediaPlayer();
      mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
     lmanager = new LinearLayoutManager(this);
       gmanager = new GridLayoutManager(this,2);
  
      rv = (RecyclerView) findViewById(R.id.rv1);
     //initializeRecyclerView();
      rv.setLayoutManager(lmanager);
      pb.setVisibility(pb.VISIBLE);
      if(isconnected()) {
          new Podcast_async(this).execute(&quot;https://www.npr.org/rss/podcast.php?id=510298&quot;);
      }
  }
  </code></pre>
  <p>Grid layout XML:</p>
  <pre><code>&lt;android.support.v7.widget.CardView
      android:layout_below=&quot;@+id/tool_bar&quot;
      android:layout_alignParentLeft=&quot;true&quot;
      android:layout_alignParentStart=&quot;true&quot;
      android:layout_height=&quot;150dp&quot;
      android:paddingRight=&quot;10dp&quot;
      android:paddingBottom=&quot;10dp&quot;
      android:paddingLeft=&quot;5dp&quot;
      android:paddingTop=&quot;5dp&quot;
      android:layout_width=&quot;150dp&quot;&gt;
  
      &lt;ImageView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;115dp&quot;
  
          android:id=&quot;@+id/imageView4&quot; /&gt;
  
      &lt;ImageButton
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;118dp&quot;
  
          android:background=&quot;@null&quot;
          app:srcCompat=&quot;@drawable/playcircle&quot;
          android:id=&quot;@+id/imageButton2&quot; /&gt;
  
      &lt;TextView
          android:text=&quot;TextView&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_marginTop=&quot;120dp&quot;
  
          android:id=&quot;@+id/textView4&quot;
          android:layout_height=&quot;30dp&quot;
          android:gravity=&quot;center_horizontal&quot; /&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/DlbGN.png" rel="nofollow noreferrer">Emulator</a></p>