How To Add A Advance or New Menu In Settings!!

Welcome everyone !! 
Here I guide You To Add a new menu in Your Settings

process is very simple but this time gonna be little tricky
read carefully before you proceed

Requirements
Apktool
Knowledge of decompiling/recompiling
Settings.apk
Brain!!

VIDEO GUIDE


Process:

  • this time not showing you all installation and decompiling jus follow previous guides and decompile your settings. apk
  • after that open path res/xml/dashboard_categories.xml
  • here  create a new tile in which you want to add a new menu don't know how to do it 
  • follow this guide 
  • Don't Do below step its jus for understanding fragments  We do it later
  • after creating a new tile using above guide add new lines  that is android fragments see below  and where i am using paras/parasSettings that is location of my smali file  in smali folder there is com/android /settings  and here add folder paras or any name under paras folder create new file with ParasSettings.smali  make sure you have mention this in Android fragments 
  • Code:
  •   <dashboard-tile android:icon="@drawable/ad" android:id="@id/paras" android:title="@string/adv" android:fragment="com.android.settings.paras.parasSettings" />
  • Just Copy paste Above code in your dashboardCategories. xml
  • i am adding a new menu for advanced tile so I have to mention in strings also 
  •  before working on smali code we have to make new menu from which advanced tile can acess
  • in simple what you want to show when you click on Advance tile
  • for this add a new xml in res/xml here with urname.xml   and start codding here like adding apps n tiles
  • there is tricky work  change code dashboard-tile to preferenceScreen  and dashboardCategory to PreferenceCategory
  • like this 
  • now adding some apps here using above logic don't know how to add apps follow this guide
  • after creating your new xml save it.. urname.xml
  • now recompile settings if you are getting errors solve them because m not there or comment below
  • if you successfully recompiled congrats now you can move to next step

EDITING AND CREATEING A SMALI FILE


  • OK This is tough One first open path  smali/com/android/settings/    here Create A folder name paras or same as you are using in Android fragments above
  • after creating a folder create new file parasSettings or same name in Android fragments you are using. 
  • now carefully see Above  image a start coding like that with proper spaces 
  • here you see a no.  0x7f060067  that you can get from public.xml from settings like we created a new xml so when we recompile first time a public id will generate automatically for your new xml find  that ID and replace it within code
  • Now save it with name.smali 
  • All done recompile, sign And Push!!! 



Thanks for reading my news about How To Add A Advance or New Menu In Settings!! at my blog Custom Droid Rom if you want too share this article, please put the resource, and if you think this article is very usefully dont forget to bookmark this site with CTRL + D on your keyboard to web browser.

New and Hot Article's :

Note: only a member of this blog may post a comment.