title: Unconditional layout inflation from view adapter warning
body: <p>I am using GridView in my alert dialogue with below codes.its giving me error called in title. My codes and more required information is like below.</p>
  
  <pre><code>  private void showGotoPageDialog() {
  
          final Dialog mDialog = new Dialog(getActivity());
          mDialog.setContentView(R.layout.grid_dialogue);
          mDialog.getWindow().setLayout(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
          GridView mGridView = (GridView) mDialog.findViewById(R.id.grid_dialog);
          ArrayList&lt;String&gt; tmp = new ArrayList&lt;&gt;(mPageOptions.length);
          for(int i = 0; i &lt; mPageOptions.length; i++)
          {
              tmp.add(mPageOptions[i].split(" ")[1]);
          }
          CustomAdapter adapter = new CustomAdapter(getActivity(), tmp, mPageIndx);
          //ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(getActivity(), android.R.layout.simple_list_item_1, tmp);
          mGridView.setAdapter(adapter);
          mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int item, long l) {
                  mDialog.dismiss();
                  mPageIndx = item + 1;
                  updateQuotesListServer();
                  updatePageInfo();
              }
          });
          mDialog.show();
          TextView dismiss = (TextView) mDialog.findViewById(R.id.dialog_dismiss);
          dismiss.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  mDialog.dismiss();
              }
          });
      }
  </code></pre>
  
  <p>and Adapter like this</p>
  
  <pre><code> private class CustomAdapter extends BaseAdapter
      {
          private ArrayList&lt;String&gt; list;
          private LayoutInflater inflater;
          private int currentPage;
  
          CustomAdapter(Activity activity, ArrayList&lt;String&gt; list, int currentPage)
          {
              this.list = new ArrayList&lt;&gt;();
              this.list.addAll(list);
              inflater = (LayoutInflater) activity.getSystemService(AppCompatActivity.LAYOUT_INFLATER_SERVICE);
              this.currentPage = currentPage;
          }
  
          public void setCurrentPage(int currentPage)
          {
              this.currentPage = currentPage;
          }
  
          @Override
          public int getCount() {
              return list.size();
          }
  
          @Override
          public Object getItem(int i) {
              return null;
          }
  
          @Override
          public long getItemId(int i) {
              return i;
          }
  
          @Override
          public View getView(int i, View view, ViewGroup viewGroup) {
              view = View.inflate(getActivity(),R.layout.dialogue_item, null);
              TextView txt = (TextView) view.findViewById(R.id.textview_dialogue);
              txt.setText(list.get(i));
              if(i == currentPage-1)
              {
                  txt.setTextColor(Color.BLACK);
              }
  
              return view;
          }
      }
  </code></pre>
  
  <p>its giving me warning on this line</p>
  
  <pre><code>view = View.inflate(getActivity(),R.layout.dialogue_item, null);
  </code></pre>
  
  <p>warning is like below</p>
  
  <pre><code>Unconditional layout inflation from view adapter: Should use View Holder pattern (use recycled view passed into this method as the second parameter) for smoother scrolling.
  </code></pre>
  
  <p>My code is working fine as expected and I am not facing any issue. <code>I want know that What changes require for fix this and what is benefit of it ?</code> Let me know if someone can help me for come out from this and solve my doubt. </p>
  
  <p>Thanks</p>