title: Set selection on staggared gridview is not working for the first time?
body: <p>I want my etsy's staggered gridview to set selection at the middle of all elements like if data is 100 then gridview should set it to 50th position.It does work if i scroll it and then call but it does not work for first time when data gets added.</p>
  
  <p>I have tried several solutions here like clearing focus and then requestfromtouch method but nothing helps.Here is my code -:</p>
  
  <pre><code>class LoadDataAsyncTask extends AsyncTask&lt;Void, Void, Void&gt; {
  
  
      @Override
      protected Void doInBackground(Void... voids) {
         // my code here
          return null;
      }
  
      @Override
      protected void onPostExecute(Void aVoid) {
          super.onPostExecute(aVoid);
          if(isTopListLoaded) {
              productDetailModelArrayList.addAll(0,productDetailModels);
          } else {
              productDetailModelArrayList.addAll(productDetailModels);
          }
          final int scrollPosition = gridView.getFirstVisiblePosition() + AppConstants.API_DATA_LIMIT;
  
          if(productDetailModelArrayList.size() == productDetailModels.size()) {
              //doesn't work here
              gridView.setSelection(productDetailModels.size());
          } else {
              // works here
              if(gridView.getColumnWidth() &lt;= getResources().getDisplayMetrics().widthPixels) {
                  gridView.setSelection(scrollPosition/2);
              } else {
                  gridView.setSelection(scrollPosition);
              }
          }
          homeScreenAdapter.notifyDataSetChanged();
  
      }
  }
  </code></pre>
  
  <p>Any idea?</p>