[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/network_traffic_title" android:summary="@string/network_traffic_summary">
<PreferenceCategory android:title="@string/sb_traffic_title" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:entries="@array/sb_traffic_entries"
android:title="@string/sb_traffic_align_title"
android:key="status_bar_traffic_position"
android:defaultValue="1"
android:entryValues="@array/sb_traffic_values" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:entries="@array/sb_traffic_line_entries"
android:title="@string/sb_traffic_line_title"
android:key="status_bar_traffic_line"
android:defaultValue="1"
android:entryValues="@array/sb_traffic_line_values" />
<com.android.settings.bamzzz.prefs.ColorPickerPreference
android:title="@string/sb_traffic_color_title"
android:key="status_bar_traffic_color"
android:defaultValue="\#ffffffff"
alphaSlider="true" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:entries="@array/sb_traffic_font_style_entries"
android:title="@string/sb_traffic_font_title"
android:key="status_bar_traffic_font"
android:defaultValue="0"
android:entryValues="@array/traffic_font_style_values" />
<com.android.settings.bamzzz.prefs.SeekBarPreference
android:icon="@null"
android:max="23"
android:title="@string/sb_traffic_size_title"
android:key="status_bar_traffic_size"
android:defaultValue="16"
min="5"
unitsRight="dp" />
<PreferenceScreen android:title="@string/sb_traffic_adv_custom_title">
<PreferenceCategory android:title="@string/sb_traffic_adv_custom_title" />
<com.android.settings.bamzzz.prefs.SeekBarPreference
android:icon="@null"
android:max="10"
android:title="@string/sb_traffic_shadow_r_title"
android:key="status_bar_traffic_shadow_r"
android:defaultValue="1"
min="0"
unitsRight="" />
<com.android.settings.bamzzz.prefs.SeekBarPreference
android:icon="@null"
android:max="5"
android:title="@string/sb_traffic_shadow_x_title"
android:key="status_bar_traffic_shadow_x"
android:defaultValue="0"
min="-5"
unitsRight="" />
<com.android.settings.bamzzz.prefs.SeekBarPreference
android:icon="@null"
android:max="5"
android:title="@string/sb_traffic_shadow_y_title"
android:key="status_bar_traffic_shadow_y"
android:defaultValue="0"
min="-5"
unitsRight="" />
<com.android.settings.bamzzz.prefs.ColorPickerPreference
android:title="@string/sb_traffic_shadow_c_title"
android:key="status_bar_traffic_shadow_c"
android:defaultValue="\#89000000"
alphaSlider="true" />
</PreferenceScreen>
</PreferenceScreen>

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

<string name="network_traffic_title">Network traffic</string>
<string name="network_traffic_summary">Enable various network traffic options in statusbar</string>
<string name="sb_traffic_title">Traffic ThinkingBridge</string>
<string name="sb_traffic_align_title">Traffic alignment</string>
<string name="sb_traffic_color_title">Traffic color</string>
<string name="sb_traffic_size_title">Traffic size</string>
<string name="sb_traffic_font_title">Traffic font</string>
<string name="sb_traffic_line_title">Traffic style</string>
<string name="sb_traffic_right">Right</string>
<string name="sb_traffic_left">Left</string>
<string name="sb_traffic_dont_show">"Don't Show"</string>
<string name="sb_traffic_font_normal">Normal</string>
<string name="sb_traffic_font_italic">Italic</string>
<string name="sb_traffic_font_bold">Bold</string>
<string name="sb_traffic_font_bold_italic">Bold Italic</string>
<string name="sb_traffic_font_light">Light</string>
<string name="sb_traffic_font_light_italic">Light Italic</string>
<string name="sb_traffic_font_thin">Thin</string>
<string name="sb_traffic_font_thin_italic">Thin Italic</string>
<string name="sb_traffic_font_condensed">Condensed</string>
<string name="sb_traffic_font_condensed_italic">Condensed Italic</string>
<string name="sb_traffic_font_condensed_light">Condensed Light</string>
<string name="sb_traffic_font_condensed_light_italic">Condensed Light Italic</string>
<string name="sb_traffic_font_condensed_bold">Condensed Bold</string>
<string name="sb_traffic_font_condensed_bold_italic">Condensed Bold Italic</string>
<string name="sb_traffic_font_medium">Medium</string>
<string name="sb_traffic_font_medium_italic">Medium Italic</string>
<string name="sb_traffic_font_black">Black</string>
<string name="sb_traffic_font_black_italic">Black Italic</string>
<string name="sb_traffic_adv_custom_title">Adv Text Customization</string>
<string name="sb_traffic_shadow_r_title">Shadow radius</string>
<string name="sb_traffic_shadow_x_title">Shadow Dx</string>
<string name="sb_traffic_shadow_y_title">Shadow Dy</string>
<string name="sb_traffic_shadow_c_title">Shadow color</string>

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

<string-array name="sb_traffic_font_style_entries">
<item>@string/sb_traffic_font_normal</item>
<item>@string/sb_traffic_font_italic</item>
<item>@string/sb_traffic_font_bold</item>
<item>@string/sb_traffic_font_bold_italic</item>
<item>@string/sb_traffic_font_light</item>
<item>@string/sb_traffic_font_light_italic</item>
<item>@string/sb_traffic_font_thin</item>
<item>@string/sb_traffic_font_thin_italic</item>
<item>@string/sb_traffic_font_condensed</item>
<item>@string/sb_traffic_font_condensed_italic</item>
<item>@string/sb_traffic_font_condensed_light</item>
<item>@string/sb_traffic_font_condensed_light_italic</item>
<item>@string/sb_traffic_font_condensed_bold</item>
<item>@string/sb_traffic_font_condensed_bold_italic</item>
<item>@string/sb_traffic_font_medium</item>
<item>@string/sb_traffic_font_medium_italic</item>
<item>@string/sb_traffic_font_black</item>
<item>@string/sb_traffic_font_black_italic</item>
</string-array>
<string-array name="traffic_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="sb_traffic_line_entries" translatable="false">
<item>Single</item>
<item>Dual</item>
</string-array>
<string-array name="sb_traffic_line_values" translatable="false">
<item>1</item>
<item>2</item>
</string-array>
<string-array name="sb_traffic_entries" translatable="false">
<item>@string/sb_traffic_dont_show</item>
<item>@string/sb_traffic_left</item>
<item>@string/sb_traffic_right</item>
</string-array>
<string-array name="sb_traffic_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>

5. Recompile Settings..

6. Done