[Asus Zenfone 4] bamzzz:
Hi all.. this is my second guide about modifying AsusSystemUI..

This guide is based on the Asus Zenfone 4S (T00Q) Lollipop firmware.

Feature:

Change Traffic Style (Single, Dual)

Change Traffic alignment (hide/left/right)

Change Traffic color

Change Traffic size

Change Traffic font

Advanced text customization

Requirement:

- Understanding about APK compile/decompile

- APKTool

- Notepad++ (PC)

How:

Part AsusSystemUI:

1. Decompile AsusSystemUI.apk

2. Put smali from guide to smali folder.. Overwrite if already exist..

3. Open res/layout/statusbar.xml, and find

<com.android.keyguard.AlphaOptimizedLinearLayout android:id="@id/notification_icon_area_inner" ...

Add below:

<com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="left|center" android:id="@id/Traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="3.0dip" android:paddingEnd="3.0dip" />

4. Open res/layout/system_icons.xml and find

<ImageView android:id="@id/wifi_direct" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />

Add below:

<com.android.systemui.statusbar.policy.TrafficBamz android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="right|center" android:id="@id/Traffic2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="3.0dip" android:paddingEnd="3.0dip" />

5. Open res/values/ids.xml

Scroll to end of line, add above </resources> :

<item type="id" name="Traffic">false</item>
<item type="id" name="Traffic2">false</item>

6. Open res/values/styles.xml

Scroll to end of line, add above </resources> :

<style name="TextAppearance.StatusBar.Traffic" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textStyle">bold</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">14.0dip</item>
<item name="android:shadowColor">#89000000</item>
<item name="android:shadowDx">0.0</item>
<item name="android:shadowDy">0.0</item>
<item name="android:shadowRadius">1.5</item>
<item name="android:fontFamily">roboto-bold</item>
</style>

7. Done. Just Recompile UI , dont forget to Sign and zipalign.

8. SystemUI already push into system

Part ZenControl:

1. Decompile ZenControl

2. Open /res/xml/ui_prefs.xml and add this:

<PreferenceScreen android:title="@string/network_traffic_title" android:summary="@string/network_traffic_summary">
<PreferenceCategory android:title="@string/sb_traffic_title" />
<com.wubydax.romcontrol.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.wubydax.romcontrol.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.wubydax.romcontrol.prefs.ColorPickerPreference
android:title="@string/sb_traffic_color_title"
android:key="status_bar_traffic_color"
android:defaultValue="\#ffffffff"
alphaSlider="true" />
<com.wubydax.romcontrol.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.wubydax.romcontrol.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.wubydax.romcontrol.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.wubydax.romcontrol.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.wubydax.romcontrol.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.wubydax.romcontrol.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 ZenControl..

6. Install ZenControl as normal APK

Good luck.. Keep Oprek.. Salam Bootloop

Created by bamzzz@xda

fb.me/bamz4ever

http://xdaforums.com/member.php?u=4672359

ZenControl by Wuby986@xda & daxgirl@xda

http://xdaforums.com/andr...-devs-t3146567

Video: https://www.youtube.com/watch?v=5Ouhzgoc-4Y

Enjoy!