[Sony Xperia M2] FunSucker:
!! Hello XDA !!

=====================

Last update: 1-16-2017​

STOCK (BATTERY PERCENTAGE OFF)

[IMG="Stock"]https://s5.postimg.org/4hth3hc8n/battery+1.png[/IMG]

STOCK (BATTERY PERCENTAGE ON)

[IMG="Stock"]https://s5.postimg.org/e3n1js3ef/battery+2.png[/IMG]

MOD (BATTERY PERCENTAGE OFF)

[IMG="Stock"]https://s5.postimg.org/71p3xkzsn/battery+3.png[/IMG]

MOD (BATTERY PERCENTAGE ON)

[IMG="Stock"]https://s5.postimg.org/utyf941tj/battery+4.png[/IMG]​

What have I done ??

Created a new layout structure, so that it looks different, when we choose the percentage mode on or off.

Created a new battery icon pack

Colored the stock battery icon pack

How to?

1. First, yes right!! Decompile your SystemUI.apk please (i'm using THIS GREAT TOOL by [MENTION=4315551]Ticklefish[/MENTION] || thanks :D )

2. Open your msim_system_icons.xml for Dual-SIM devices or system_icons.xml for Single-SIM devices. (res/layout/here)

Find this lines:

<LinearLayout android:id="@id/somc_battery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="4.0dip">
<ImageView android:layout_gravity="center_vertical" android:id="@id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<LinearLayout android:id="@id/battery_meter" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ImageView android:layout_gravity="center_vertical" android:id="@id/battery_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stamina_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<FrameLayout android:id="@id/battery_percent" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.sonymobile.systemui.statusbar.BatteryImage android:layout_gravity="start|center" android:id="@id/battery_percent_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>

Change to be like this:

<LinearLayout android:id="@id/somc_battery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="4.0dip" android:gravity="center_vertical" >
<ImageView android:id="@id/status" android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<FrameLayout android:id="@id/battery_meter" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingBottom="1.0dip">
<TextView android:layout_width="wrap_content" android:layout_height="12.0dip" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:text="POWER -" android:id="@+id/text_bat_add" android:textSize="7.0dip" android:gravity="center_vertical" android:paddingRight="2.0dip" />
<com.erryy.BatteryText android:layout_width="wrap_content" android:layout_height="12.0dip" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="7.0dip" android:gravity="center_vertical" android:layout_gravity="right|top" android:paddingRight="3.0dip" />
<ImageView android:layout_gravity="center_horizontal|bottom" android:id="@id/battery_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_horizontal|bottom" android:id="@id/stamina_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
<FrameLayout android:id="@id/battery_percent" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.sonymobile.systemui.statusbar.BatteryImage android:layout_gravity="start|center" android:id="@id/battery_percent_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>

3. Copy my icons to the correct directory (look at attachment)

4. Copy smali codes to the correct directory. This is for adding battery percentage (look at attachment or check this LINK for original thread) || Thanks to [MENTION=4485836]Erhany[/MENTION] :D

FIXING IN EXPANDED HEADER (FOR DUAL-SIM ONLY)

Open your status_bar_expanded_header.xml, and find this line :

<FrameLayout android:layout_gravity="center_vertical" android:id="@id/system_icons_container" android:layout_width="wrap_content" android:layout_height="@dimen/status_bar_height">
<include layout="@layout/system_icons" />
</FrameLayout>

Change to be like this :

<FrameLayout android:layout_gravity="center_vertical" android:id="@id/system_icons_container" android:layout_width="wrap_content" android:layout_height="@dimen/status_bar_height">
<include layout="@layout/msim_system_icons" />
</FrameLayout>

5. Recompile and done !!

NOTE :

I'm running on Z5 STYLE ROM || base 5.1 || D2302 (Dual-SIM)

[*]If you want to try my codes in different devices or OS or ROM, please adapted with your codes

[*]If you want to change the icons, i suggest to adjust the size of icons that I made. Because I using FrameLayout, not LinearLayout for icons re-position