[Android General] Zidni:
This is the update version of this guide : https://xdaforums.com/showpost.php?p=65925174&postcount=5419

Feature Included:

-On/Off Switch

-Color Used Ram Text

-Color Free Ram Text

on recent panel.

Tested on AOSP MM 6.0

Follow the instruction:

Part 1

SystemUI.apk Part

Download the attached file

merge systemui folder with your decompiled SystemUI.apk

open SystemUI/res/layout/recents.xml

at the end before the </ FrameLayout> add this

<com.android.systemui.rz.LeftLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="35.0dip" key="aokpram_recent" android:layout_weight="1.0">
<com.zidni.recents.aokpram android:layout_width="fill_parent" android:layout_height="30.0dip" />
</com.android.systemui.rz.LeftLayout>

open SystemUI/res/values/strings.xml

add this string at end of file add this

<string name="quick_panel_data_usage">Data usage</string>
<string name="service_background_processes">%1$s free</string>
<string name="service_foreground_processes">%1$s used</string>

save changes & recompile, sign, push systemui.apk

now follow the 2nd part.

Part 2

Settings or Rom Control Part

if you already have rom control app then just add this line to your ui.xml or whatever you like

<SwitchPreference android:title="RAM Bar on Recent App" android:key="aokpram_recent" android:defaultValue="true" android:summaryOn="Shown" android:summaryOff="Hidden" />
<com.wubydax.romcontrol.prefs.ColorPickerPreference android:title="Used Ram Text Color" android:key="ram_color1" android:defaultValue="\#ffffffff" app:packageNameToKill="com.android.systemui" app:isSilent="false" alphaSlider="true" hexValue="true" />
<com.wubydax.romcontrol.prefs.ColorPickerPreference android:title="Free Ram Text Color" android:key="ram_color2" android:defaultValue="\#ffffffff" app:packageNameToKill="com.android.systemui" app:isSilent="false" alphaSlider="true" hexValue="true" />

done.

but if you don't have rom control then you need add in settings.....

follow this guide to add color preferences - https://xdaforums.com/crossdevice-dev/sony-themes-apps/guide-color-picker-preferences-rom-t3429822

follow this guide to add switch preference - https://xdaforums.com/showpost.php?p=64964525&postcount=3

now add this code to your preference xml

<com.android.settings.cyanogenmod.SystemSettingSwitchPreferenceandroid:title="RAM Bar on Recent App" android:key="aokpram_recent" android:defaultValue="true" android:summaryOn="Shown" android:summaryOff="Hidden" />
<com.android.settings.rz.colorpicker.ColorPickerPreference android:title="Used Ram Text Color" android:key="ram_color1" android:defaultValue="\#ffffffff" app:packageNameToKill="com.android.systemui" app:isSilent="false" alphaSlider="true" hexValue="true" />
<com.android.settings.rz.colorpicker.ColorPickerPreference android:title="Free Ram Text Color" android:key="ram_color2" android:defaultValue="\#ffffffff" app:packageNameToKill="com.android.systemui" app:isSilent="false" alphaSlider="true" hexValue="true" />

Credits:

[MENTION=4798992]UNS4[/MENTION] 4pda.ru

[MENTION=6896369]madgit[/MENTION] xda

[MENTION=4433143]venkat kamesh[/MENTION] xda

[MENTION=6696465]Zidni[/MENTION] xda (me) :D