Set grid view width, Android
<p>I'm trying to make a calendar activity, which uses Grid view to display the days in the month. It needs to display 7 elements per row which correspond to 7 days of the week. However, when I try to implement it, it doesn't stretch the elements across the entire width of the screens, as there is a small gap at the very right end of the screen as seen in this picture.
 <a href="http://i.stack.imgur.com/yajEK.png" rel="nofollow">calendar picture</a></p>

<p>This is the xml code I use for grid view:</p>

<pre><code>&lt;GridView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/grid_view"
        android:numColumns="7"
        android:stretchMode="columnWidth"&gt;
    &lt;/GridView&gt;
</code></pre>

<p>I'm also using genymotion emulator so I haven't tested it on a real device.</p>