title: ListView elements are not visible by default
body: <p>Below is my code and image. I am populating the listview with the arraylist in <code>runOnUIThread()</code> in <code>onpostexecute()</code>  which has values gotten from the remote server in the doInBackground(). But the thing is elements are visible only when the focus is on particular item. I have been trying with different things to set the elements visible, but all have gone vain. Can someone please suggest me how to get the items visible. Note: I can't extend the ListActivity, as I have another class that needs to be extended which is the subclass of an activity.</p>
  
  <pre><code>runOnUiThread(new Runnable() {
  
       public void run() {
               //Updating parsed json data to Listview
  
              ListView listView = (ListView)findViewById(R.id.listsubcategory);
  
  
      ArrayAdapter&lt;String&gt; arrayAdapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(),android.R.layout.simple_list_item_1, subCategoryList);
                          listView.setAdapter(arrayAdapter); 
  
  
                          listView.setOnItemClickListener(new OnItemClickListener() {
  
                                          @Override
                                          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                                                          int position, long id) {
  
  
  
                           String selectedSubcategory = subCategoryList.get(position);
                           Toast.makeText(getApplicationContext(), "You clicked on "+selectedSubcategory, Toast.LENGTH_SHORT).show();
  
  
                                          }
                                  });
  
  
                   }
               });
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EbVfA.png" alt="enter image description here"></p>