title: ListView in fragment doesn't show
body: <p>I'm trying to populate a listView inside a fragment, with custom layout. But when i launch the application the content of listview is not loaded (this is obtained using an array adapter). 
  Here the code where i load the listView: </p>
  
  <pre><code>    @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          view = inflater.inflate(R.layout.activity_start, container, false);
          ProfilesDatabaseHelper dbHelper = ac.getDbManager();
          ProfileManagerDAO dbDao = ac.getProfileManagerDAO();
          //TODO mettere profilehandler dentroo profileapp.
          ProfileHandler handler = new ProfileHandler(view.getContext());
          Profile profile = handler.getCurrentProfile();
          TextView label = (TextView) view.findViewById(R.id.labelvlm);
          label.setText("TEST");
          if(handler!=null){
              label.setText("Ring Volume: " + profile.getRingVolume() + "Max: " 
                      + handler.getMaxVolume(AudioManager.STREAM_RING));
              label.append("\tVoice Call Volume: " + profile.getCallVolume()
                      + " Max: " + handler.getMaxVolume(AudioManager.STREAM_VOICE_CALL));
              //manager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, 5, 0); 
              label.append("\tWIFI Status: " + handler.isWifiActive());           
          }
          Ringtone tone = RingtoneManager.getRingtone(view.getContext(), Settings.System.DEFAULT_RINGTONE_URI);
          if(tone!=null){
              label.append("\n" + tone.getTitle(view.getContext()));  
          }
          SeekBar bar = (SeekBar) view.findViewById(R.id.ringtonevolumeBar);
          bar.setMax(handler.getMaxVolume(AudioManager.STREAM_RING));     
          bar.setProgress(profile.getRingVolume());
          ArrayList&lt;String&gt; profiles = ac.getProfileManagerDAO().getprofileNamesList();
          if(profiles!=null){
              Log.d(TAG, "List size: " + profiles.size());
              ListView profileslist = (ListView) view.findViewById(R.id.profileslist);            
              adapter = new ProfilesArrayAdapter(view.getContext(), R.layout.list_item, profiles);
              profileslist.setAdapter(adapter);
  //          List&lt;String&gt; testing = new ArrayList&lt;String&gt;();
  //            testing.add("Hey");
  //            testing.add("Hey Do");
  //            testing.add("Hey It");
  //            testing.add("Hey Please");
  //            ArrayAdapter moviesAdapter = new ArrayAdapter&lt;String&gt;(getActivity(),android.R.layout.simple_list_item_1, testing);
  //            profileslist.setAdapter(moviesAdapter);
              //profileslist.setA
          }
          return view;
      }
  </code></pre>
  
  <p>Here the code of my CustomAdapter:</p>
  
  <pre><code>public class ProfilesArrayAdapter extends
      ArrayAdapter&lt;HashMap&lt;String, Integer&gt;&gt; {
  
  ArrayList&lt;HashMap&lt;String, Integer&gt;&gt; entries;
  int resourceId;
  Context context;
  
  static class ProfileItemHandler {
      TextView profileId;
      TextView profileName;
  }
  
  public ProfilesArrayAdapter(Context context, int layoutResourceId, ArrayList&lt;HashMap&lt;String,Integer&gt;&gt; profiles) {
      super(context, layoutResourceId);
      this.context = context;
      this.resourceId = layoutResourceId;
      this.entries = profiles;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View row = convertView;
      ProfileItemHandler handler = null;
      if(convertView==null){
          LayoutInflater inflater = ((Activity)context).getLayoutInflater();
          row = inflater.inflate(R.layout.list_item, parent, false);
          handler = new ProfileItemHandler();
          handler.profileId = (TextView) row.findViewById(R.id.profileName);
          handler.profileName = (TextView) row.findViewById(R.id.profileId);
          row.setTag(handler);
      } else {
          handler = (ProfileItemHandler) row.getTag();
      }
      HashMap&lt;String, Integer&gt; entry = this.getItem(position);
      for(String cur_entry: entry.keySet()){
          handler.profileId.setText(cur_entry);
          handler.profileName.setText(entry.get(cur_entry));
      }               
      return row;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And this is the xml for list item layout: </p>
  
  <pre><code>    &lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;
      &lt;TextView android:layout_height="wrap_content" android:id="@+id/profileId" android:text="TextView" android:textAppearance="?android:attr/textAppearanceLarge" android:layout_width="wrap_content"&gt;&lt;/TextView&gt;
      &lt;TextView android:text="TextView" android:id="@+id/profileName" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And here the main layout: </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_start"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context=".StartActivity" &gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/labelvlm"
          android:text="@string/hello_world" /&gt;
  
      &lt;SeekBar
          android:id="@+id/ringtonevolumeBar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@+id/labelvlm"        
          android:layout_marginTop="122dp" /&gt;
  
      &lt;ListView
          android:id="@+id/profileslist"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignLeft="@+id/ringtonevolumeBar"
          android:layout_below="@+id/ringtonevolumeBar"
          android:layout_marginTop="68dp" &gt;
      &lt;/ListView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I don't receive any error message, but when i launch the application, no items are shown in listView, and the method getView of my Adapter is never called. Any idea?</p>