2012. 12. 11. 16:54

 

  PreferenceScreen root = getPreferenceManager().createPreferenceScreen(this);


 addPreferece("테스트", "key");

 protected void addPreferece(String title, String key) {
  PreferenceCategory addCategory = (PreferenceCategory) findPreference("addCategory");
  
  Preference addPrefer = new Preference(this);
  addPrefer.setKey(key);
  addPrefer.setTitle(title);
  addCategory.addPreference(addPrefer);
  
  root.addPreference(addCategory);
  

 }

 

 

'Android > Preference' 카테고리의 다른 글

[4] Preference 에 animation 붙이기  (0) 2012.12.12
[1] custom Preference 만들기  (0) 2012.12.11
Posted by hoonihoon