Code example for PreferenceCategory

Methods: setTitle

0
 
		// Root 
        PreferenceScreen root = getPreferenceManager().createPreferenceScreen(this);
     
        // Dialog based preferences 
        PreferenceCategory dialogBasedPrefCat = new PreferenceCategory(this);
         
        int indexLastParam = params.size()-1;
         
        if (params.get(indexLastParam).getName().equals("comment")) {
        	dialogBasedPrefCat.setTitle(params.get(indexLastParam).getValue());
        } else { 
        	dialogBasedPrefCat.setTitle("");
        } 
         
        // dialogBasedPrefCat.setTitle(params.get(indexLastParam).getValue()); 
        root.addPreference(dialogBasedPrefCat);
		 
		for (int i = 1; i < params.size(); i++) {
			 
			name = params.get(i).getName();