[Asus Zenfone 4] bamzzz:
Include preference into Settings

How to include preference into settings:

1. Follow my guide: http://xdaforums.com/zenfone-4/themes-apps/guide-easy-preference-control-t3317849

2. Open res/xml/zen_prefs.xml, and add:

<PreferenceScreen android:title="@string/status_bar_weather_title"
android:summary="@string/status_bar_weather_summary">
<PreferenceCategory android:title="@string/status_bar_weather_title" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:defaultValue="0"
android:key="status_bar_temperature"
android:title="@string/status_bar_weather_title"
android:dialogTitle="@string/status_bar_weather_title"
android:entries="@array/status_bar_weather_entries"
android:entryValues="@array/status_bar_weather_values" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:defaultValue="1"
android:key="status_bar_temperature_style"
android:title="@string/status_bar_weather_location_title"
android:dialogTitle="@string/status_bar_weather_location_title"
android:entries="@array/status_bar_weather_location_entries"
android:entryValues="@array/status_bar_weather_location_values" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:defaultValue="1"
android:key="status_bar_weather_rainbow_color"
android:title="@string/status_bar_weather_color_title"
android:entries="@array/status_bar_weather_rainbow_color_entries"
android:entryValues="@array/status_bar_weather_rainbow_color_values" />
<com.android.settings.bamzzz.prefs.ColorPickerPreference
android:title="@string/status_bar_weather_custom_color"
android:key="status_bar_weather_color"
android:defaultValue="\#ffffffff"
alphaSlider="true" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:defaultValue="0"
android:key="status_bar_weather_icon"
android:title="@string/status_bar_weather_icon_title"
android:entries="@array/status_bar_weather_icon_entries"
android:entryValues="@array/status_bar_weather_icon_values" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:defaultValue="1"
android:key="status_bar_weather_condition_icon"
android:title="@string/status_bar_weather_condition_icon_title"
android:dialogTitle="@string/status_bar_weather_condition_icon_dlg_title"
android:entries="@array/status_bar_weather_condition_icon_entries"
android:entryValues="@array/status_bar_weather_condition_icon_values" />
<SwitchPreference
android:defaultValue="false"
android:key="status_bar_weather_colorize_all_icons"
android:title="@string/status_bar_weather_colorize_all_icons_title"
android:summary="@string/status_bar_weather_colorize_all_icons_summary" />
<com.android.settings.bamzzz.prefs.ColorPickerPreference
android:title="@string/status_bar_weather_icon_color_title"
android:key="status_bar_weather_icon_color"
android:defaultValue="\#ffffffff"
alphaSlider="true" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:defaultValue="0"
android:key="status_bar_weather_font_style"
android:entries="@array/status_bar_weather_font_style_entries"
android:entryValues="@array/status_bar_weather_font_style_values"
android:title="@string/status_bar_weather_font_style_title" />
<com.android.settings.bamzzz.prefs.SeekBarPreference
android:icon="@null"
android:key="status_bar_weather_size"
android:title="@string/status_bar_weather_size_title"
android:max="23"
min="4"
android:defaultValue="14"
unitsRight="dp" />
<PreferenceScreen
android:summary="@string/status_bar_open_weather_settings_summary"
android:title="@string/status_bar_open_weather_settings_title">
<intent
android:targetClass="com.cyanogenmod.lockclock.preference.Preferences"
android:targetPackage="com.cyanogenmod.lockclock" />
</PreferenceScreen>
</PreferenceScreen>

3. Add this to res/values/strings.xml

<string name="status_bar_weather_title">Weather Text</string>
<string name="status_bar_weather_summary">Enable various weather text options in statusbar</string>
<string name="status_bar_weather_hidden">Hidden</string>
<string name="status_bar_weather_show_scale">Shown with scale</string>
<string name="status_bar_weather_hide_scale">Shown without scale</string>
<string name="status_bar_weather_location_title">Placement</string>
<string name="status_bar_weather_location_summary">Select where the weather temperature is shown on the statusbar</string>
<string name="status_bar_weather_location_right">Show on right</string>
<string name="status_bar_weather_location_left">Show on left</string>
<string name="status_bar_weather_color_title">Temperature color</string>
<string name="status_bar_weather_size_title">Font size</string>
<string name="status_bar_weather_font_style_title">Font style</string>
<string name="status_bar_weather_icon_title">Weather Icon</string>
<string name="status_bar_weather_icon_color_title">Weather Icon Color</string>
<string name="status_bar_weather_condition_icon_title">Condition icon</string>
<string name="status_bar_weather_condition_icon_dlg_title">Coose an icon for displaying the weather condition</string>
<string name="status_bar_weather_condition_icon_monochrome_title">Monochrome</string>
<string name="status_bar_weather_condition_icon_colored_title">Colored</string>
<string name="status_bar_weather_condition_icon_vclouds_title">VClouds</string>
<string name="status_bar_weather_colorize_all_icons_title">Colorize all icons</string>
<string name="status_bar_weather_colorize_all_icons_summary">Enable to colorize all icons, disable to colorize only the monochrome icons</string>
<string name="status_bar_weather_custom_color">Custom Color</string>
<string name="status_bar_weather_rainbow_color">Rainbow</string>
<string name="status_bar_weather_anim_rainbow_color">Animated Rainbow</string>
<string name="status_bar_open_weather_settings_title">Weather settings</string>
<string name="status_bar_open_weather_settings_summary">Open cyanogen widget preference</string>
<string name="status_bar_weather_font_normal">Normal</string>
<string name="status_bar_weather_font_italic">Italic</string>
<string name="status_bar_weather_font_bold">Bold</string>
<string name="status_bar_weather_font_bold_italic">Bold Italic</string>
<string name="status_bar_weather_font_light">Light</string>
<string name="status_bar_weather_font_light_italic">Light Italic</string>
<string name="status_bar_weather_font_thin">Thin</string>
<string name="status_bar_weather_font_thin_italic">Thin Italic</string>
<string name="status_bar_weather_font_condensed">Condensed</string>
<string name="status_bar_weather_font_condensed_italic">Condensed Italic</string>
<string name="status_bar_weather_font_condensed_light">Condensed Light</string>
<string name="status_bar_weather_font_condensed_light_italic">Condensed Light Italic</string>
<string name="status_bar_weather_font_condensed_bold">Condensed Bold</string>
<string name="status_bar_weather_font_condensed_bold_italic">Condensed Bold Italic</string>
<string name="status_bar_weather_font_medium">Medium</string>
<string name="status_bar_weather_font_medium_italic">Medium Italic</string>
<string name="status_bar_weather_font_black">Black</string>
<string name="status_bar_weather_font_black_italic">Black Italic</string>

4. Open res/values/arrays.xml and add this:

<string-array name="status_bar_weather_entries" translatable="false">
<item>@string/status_bar_weather_hidden</item>
<item>@string/status_bar_weather_show_scale</item>
<item>@string/status_bar_weather_hide_scale</item>
</string-array>
<string-array name="status_bar_weather_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="status_bar_weather_location_entries" translatable="false">
<item>@string/status_bar_weather_location_right</item>
<item>@string/status_bar_weather_location_left</item>
</string-array>
<string-array name="status_bar_weather_location_values" translatable="false">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="status_bar_weather_condition_icon_entries">
<item>@string/status_bar_weather_condition_icon_monochrome_title</item>
<item>@string/status_bar_weather_condition_icon_colored_title</item>
<item>@string/status_bar_weather_condition_icon_vclouds_title</item>
</string-array>
<string-array name="status_bar_weather_condition_icon_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="status_bar_weather_font_style_entries">
<item>@string/status_bar_weather_font_normal</item>
<item>@string/status_bar_weather_font_italic</item>
<item>@string/status_bar_weather_font_bold</item>
<item>@string/status_bar_weather_font_bold_italic</item>
<item>@string/status_bar_weather_font_light</item>
<item>@string/status_bar_weather_font_light_italic</item>
<item>@string/status_bar_weather_font_thin</item>
<item>@string/status_bar_weather_font_thin_italic</item>
<item>@string/status_bar_weather_font_condensed</item>
<item>@string/status_bar_weather_font_condensed_italic</item>
<item>@string/status_bar_weather_font_condensed_light</item>
<item>@string/status_bar_weather_font_condensed_light_italic</item>
<item>@string/status_bar_weather_font_condensed_bold</item>
<item>@string/status_bar_weather_font_condensed_bold_italic</item>
<item>@string/status_bar_weather_font_medium</item>
<item>@string/status_bar_weather_font_medium_italic</item>
<item>@string/status_bar_weather_font_black</item>
<item>@string/status_bar_weather_font_black_italic</item>
</string-array>
<string-array name="status_bar_weather_font_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
<item>17</item>
</string-array>
<string-array name="status_bar_weather_rainbow_color_entries" translatable="false">
<item>@string/status_bar_weather_custom_color</item>
<item>@string/status_bar_weather_rainbow_color</item>
<item>@string/status_bar_weather_anim_rainbow_color</item>
</string-array>
<string-array name="status_bar_weather_rainbow_color_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="status_bar_weather_icon_entries" translatable="false">
<item>@string/status_bar_weather_hidden</item>
<item>@string/right</item>
<item>@string/left</item>
</string-array>
<string-array name="status_bar_weather_icon_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>

5. Recompile Settings..

6. Done