title: android sometime getView() method doesn't work
body: <p>I made a listview. But sometime it disappeared, and it appeared when I clicked search Button. I found out through logcat that getView() method is the problem. <strong>Sometime getView() method doesn't work, but it works when I press the search button.</strong></p>
  
  <p><a href="https://i.stack.imgur.com/dP5oQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dP5oQ.jpg" alt="enter image description here"></a></p>
  
  <p>[Main Activity]  *Main Acitivity has 'onCreateOptionsMenu' function, But there're no function about listview! </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      ListView listView;
      SingerItemView adapter;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          Toolbar myToolbar = findViewById(R.id.toolbar);
          setSupportActionBar(myToolbar);
          getSupportActionBar().setDisplayShowTitleEnabled(false);
  
          //listView
          listView = findViewById(R.id.listView);
          adapter = new SingerItemView(getApplicationContext());
  
          getListInfo info = new getListInfo(this);
          info.requestGet("MyserverAddress", "", "");
          listView.setAdapter(adapter);
      }
  }
  </code></pre>
  
  <p>[SingerItemView]</p>
  
  <pre><code>public class SingerItemView extends BaseAdapter implements View.OnClickListener {
      private SingerItem mUser;
      private Context mContext;
      private TextView textCode;
      private ArrayList&lt;SingerItem&gt; mUserData;
  
      public SingerItemView(Context context) {
          super();
          mContext = context;
          mUserData = new ArrayList&lt;SingerItem&gt;();
      }
  
      @Override
      public int getCount() {
          return mUserData.size();
      }
  
      @Override
      public SingerItem getItem(int position) {
          return mUserData.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return 0;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View v = convertView;
  
          if (v == null) {
              v = ((LayoutInflater) mContext
                      .getSystemService(Context.LAYOUT_INFLATER_SERVICE))
                      .inflate(R.layout.singer_item, null);
          }
  
          textCode = v.findViewById(R.id.code);
  
          mUser = getItem(position);
  
          if (mUser != null) {
              textCode.setText(mUser.getCode());
          }
          return v;
      }
      public void add(SingerItem user) {
          mUserData.add(user);
      }
  }
  </code></pre>