Android Studio Preference Activity Code Generator

Quickly and easily generate an Android Studio project with a Preference Activity and your own custom preferences.

  • Save time by generating all the source code you need for the PreferenceActivity, PreferenceFragments, OnPreferenceChangeListener, resource XML and build files.

    Android Studio's generated Settings Activity has three pre-defined preference groups (and their screens) with example preferences, such as editable text and true/false toggles.

    Instead, use this web page to configure your own custom preference groups and preferences. Generate code that is ready to use in your application.

  • Easy-to-use Android Studio project can be imported, built and run in just minutes.
  • Easy-to-learn source code is described by help page How to Generate a Custom Android Preference Activity

To generate your own Android Studio project,
please Sign In or Create an Account.

To see how it all works, try the free
Android Pie Chart Code Generator

The generated zip file includes:

  • Source code - Java classes and XML resources for:
    • PreferenceActivity with custom preference group list
    • PreferenceFragments with the custom preference list, including:
      • EditTextPreference that shows its value in the summary
      • SwitchPreference with toggle colored by the Material accent color
      • ListPreference that launches a preference dialog and list of choices
      • Generic Preference that uses an Intent to start an external Activity
    • OnPreferenceChangeListener, the Android preference click listener
  • Material design - Customized primary and accent colors
  • Support files - Android manifest, launcher icon and gradle files

Sign In and download your zip file today!

Project Information

Project Name:
Package Name:

App and Activity Information

Application Name:
Activity Name:

Material Design Colors

Material Primary Color:
Material Accent Color:
Material Color Preview:

Preference Group Information

– Removed the copyright and license references from the comment headers of generated Java classes
– Replaced the GNU General Public License with a new End User License Agreement
– Initial release plus enhancements through December 2016


As of Version 2.0 of all mobile application templates, the GNU General Public License has been retired in favor of an End User License Agreement (EULA) that more accurately reflects the nature of proprietary software that is available by subscription.

In summary, the EULA grants Licensees ownership of and permission to use and sell all End Products generated from the downloaded Software, but you are restricted from re-distributing or reselling the Software itself, except as packaged in the End Products as needed to make them functional.

Please read the EULA in full. A copy is included in each generated Android Studio project, and referenced in the comment header of each Java source file. The retired GNU General Public License is archived here for your reference.

Please send any questions to


Information about your mobile app submitted to this web site is not permanently stored, logged on our servers, used for internal or external analytics, or shared with any other external system or third party. For more information see this websites's Privacy Policy

Copyright ©