title: How to set align for cells in GridView?
body: <p>I have the following layout: </p>
  
  <pre><code>&lt;GridView
      android:id="@+id/gridViewCalendar"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center"
      android:numColumns="7" &gt;
  &lt;/GridView&gt;
  </code></pre>
  
  <p>And the following code makes simple ArrayAdapter:</p>
  
  <pre><code>private View initializeCalendarScreen(LayoutInflater inflater) {
      View layout=inflater.inflate(R.layout.calendar_layout, null);
      GridView events=(GridView)layout.findViewById(R.id.gridViewCalendar);
  
      ArrayAdapter&lt;String&gt; adapter=new ArrayAdapter&lt;String&gt;(context, android.R.layout.simple_list_item_1, items);
      events.setAdapter(adapter);
      return layout;
  }
  </code></pre>
  
  <p>It works, but text in cells isn't on the center - it has got default align by left. How can I fix it? </p>