Dynamically fill a ListPreference
===

I am trying to fill a ListPreference with the contents of the res/anim folder but I am having a problem it keeps coming up blank, I have a static array of strings to fill it and that works but I need it to be dynamic, I can print the text out in the logcat, its just not populating the list can you help me?

PreferenceActivityMenu.java
                          
          CharSequence[] entries = null;
          CharSequence[] entryValues = null;
		
		
		/** Called when the activity is first created. */
	    @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        addPreferencesFromResource(R.xml.preferences);
        

        SharedPreferences prefs=getPreferences(Context.MODE_PRIVATE);
    	
        ListPreference prefListAnim = new ListPreference(this);

        listAnim();
        
        prefListAnim.setEntries(entries);

		prefListAnim.setEntryValues(entryValues);
        
    	
	    }
	    
	@Override
	public boolean onPreferenceClick(Preference preference) {
		// TODO Auto-generated method stub
		return false;
	}
	
	public void listAnim() {
		Field[] fields = R.anim.class.getFields();
		entries = new String[fields.length];
		entryValues = new String[fields.length];

		for (int count = 0; count < fields.length; count++) {
			Log.i("Raw Asset: ", fields[count].getName());
			entries[count] = fields[count].getName();

	        entryValues[count] = Integer.toString(count);
			

		}
	}

and preference.xml

        <PreferenceCategory android:title="Animation Transitions" >

       
        <ListPreference 
            
            android:dialogTitle="@string/prefsList_dialogTitle"
            android:key="prefList_animations"
            android:summary="@string/prefsList_summary"
            android:title="@string/prefsList_title" >
        </ListPreference>
    </PreferenceCategory>

Thanks for your help