CUSTOM BACKGROUND, MAIN TEXT COLOR AND STATUS TEXT COLOR, MATRIX ANIMATION IN POWER MENU - ANDROID 9 PIE
Thanks sagitt67 (sagitt67 on 4PDA) for guides Custom Backgrounds and Text Colors in PM - Android 9 Pie. Smali from ther were used (smalies were a little processed), but I don't know its profile on XDA - sorry. Also development of my friend mickles were used.
I. SystemUI.apk
1. Copy files from the downloaded SystemUI.rar archive and put in the decompiled SystemUI.apk
2. In SystemUI\res\layout\sec_global_actions_item.xml change TextView to com.android.settings.rz.Text and add in line keys
It as a result shall look so:
3. In SystemUI\res\layout\sec_global_actions_wrapped.xml add the code (marked bold):Code:<?xml version="1.0" encoding="utf-8"?> <LinearLayout android:gravity="center" android:layout_gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout android:gravity="center" android:layout_gravity="center" android:orientation="vertical" android:id="@id/sec_global_actions_icon_label_view" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:gravity="center" android:id="@id/sec_global_actions_icon" android:layout_width="70.0dip" android:layout_height="70.0dip" android:scaleType="center" /> <[B]com.android.settings.rz.Text[/B] android:textSize="15.0sp" android:gravity="center" android:id="@id/sec_global_actions_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:importantForAccessibility="no" android:fontFamily="roboto-regular" [B]key="primary_power_text_color"[/B] /> </LinearLayout> <[B]com.android.settings.rz.Text[/B] android:textSize="13.0sp" android:gravity="center" android:id="@id/sec_global_actions_state" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="no" android:fontFamily="roboto-regular" [B]key="status_power_text_color"[/B] /> <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/sec_global_actions_description" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:weightSum="10.0" android:importantForAccessibility="no"> <[B]com.android.settings.rz.Text[/B] android:textSize="13.0sp" android:gravity="center" android:id="@id/sec_global_actions_description_text" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="8.6" android:fontFamily="roboto-regular" [B]key="status_power_text_color"[/B] /> </LinearLayout> </LinearLayout>
Switching on/switching off of Matrix is made the easiest way without editing StatusBar.smali and other smalies.Code:<?xml version="1.0" encoding="utf-8"?> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> [B] <FrameLayout android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.android.wubydax.CustomBg android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout>[/B] [B]<mickles.app.statusbar.mLinearLayout android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" key="power_matrix_enable" value="1"> <FrameLayout android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.ther.power.MatrixEffect android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout> </mickles.app.statusbar.mLinearLayout>[/B] <LinearLayout android:layout_gravity="center|top" android:orientation="vertical" android:id="@id/sec_global_actions_top" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:gravity="center" android:layout_gravity="center" android:id="@id/sec_global_actions_item_list" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginHorizontal="@dimen/sec_global_actions_list_view_margin_horizontal" /> <FrameLayout android:gravity="center" android:layout_gravity="center" android:id="@id/sec_global_actions_item_list_land" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" /> <LinearLayout android:layout_gravity="bottom|center" android:orientation="vertical" android:id="@id/sec_global_actions_bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginVertical="@dimen/sec_global_actions_bottom_view_margin_bottom" /> <FrameLayout android:layout_gravity="center_horizontal" android:id="@id/sec_global_actions_confirmation" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </FrameLayout>
Then compile SystemUI.apk.
II Rom Control
1.
Insert the section into the right place:
2. In RomControl/res/values/arrays.xml insert these (if didn't insert such arrays earlier):Code:<PreferenceScreen android:title="Background and Text Color Settings in Power Menu" android:summary="Choose Background and Text Color"> <PreferenceCategory android:title="Background Settings in Power Menu" /> <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Enable Custom Background" android:key="enable_power_menu_custom_bg" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" /> <com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/custom_bg_type_entries" android:title="Background type" android:key="power_menu_custom_bg_type" android:dependency="enable_power_menu_custom_bg" android:defaultValue="2" android:entryValues="@array/custom_bg_type_values" /> <com.wubydax.romcontrol.v2.prefs.UriSelectionPreference android:title="Select the image for a background" android:key="power_menu_bg" android:dependency="enable_power_menu_custom_bg" /> <com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/crop_entries" android:title="Select crop factor" android:key="power_menu_crop_type" android:dependency="enable_power_menu_custom_bg" android:defaultValue="0" android:entryValues="@array/crop_values" /> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Choose Solid Color" android:key="power_menu_bg_primary_color" android:dependency="enable_power_menu_custom_bg" android:defaultValue="\#ff2f3752" /> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Choose Second Color for Gradient" android:key="power_menu_second_gradient_color" android:dependency="enable_power_menu_custom_bg" android:defaultValue="\#ff522f52" /> <com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/gradient_entries" android:title="Gradient Orientation" android:key="power_menu_bg_gradient_orientation" android:dependency="enable_power_menu_custom_bg" android:defaultValue="0" android:entryValues="@array/gradient_values" /> <com.wubydax.romcontrol.v2.prefs.MySeekBarPreference android:title="Transparensy" android:key="power_menu_opacity" android:dependency="enable_power_menu_custom_bg" android:defaultValue="255" app:maxValue="255" /> <PreferenceCategory android:title="Matrix Animation Settings in Power Menu" /> <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Matrix Animation" android:key="power_matrix_enable" android:summaryOn="Enabled " android:summaryOff="Disabled" /> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Text Color" android:key="power_matrix_anim_text_color" android:summary="Choose Text Color" android:dependency="power_matrix_enable" android:defaultValue="\#1eff00" /> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Background Color" android:key="power_matrix_anim_bg_color" android:summary="Choose Background Color" android:dependency="power_matrix_enable" android:defaultValue="\#ff000000" /> <com.wubydax.romcontrol.v2.prefs.MySeekBarPreference android:title="Transparency" android:key="power_matrix_anim_text_alpha" android:dependency="power_matrix_enable" android:defaultValue="100" app:minValue="50" app:maxValue="100" app:unitsValue="" /> <com.wubydax.romcontrol.v2.prefs.MySeekBarPreference android:title="Text Size" android:key="power_matrix_anim_font_size" android:dependency="power_matrix_enable" android:defaultValue="46" app:minValue="20" app:maxValue="100" app:unitsValue="" /> <com.wubydax.romcontrol.v2.prefs.MySeekBarPreference android:title="Animation frequency" android:key="power_matrix_anim_frequency" android:dependency="power_matrix_enable" android:defaultValue="16" app:minValue="1" app:maxValue="100" app:unitsValue="" /> <PreferenceCategory android:title="Text Color in Power Menu" /> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Main Text Color" android:key="primary_power_text_color" android:summary="Choose Text Color" android:defaultValue="\#ffffffff" /> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="Status Text Color" android:key="status_power_text_color" android:summary="Choose Text Color" android:defaultValue="\#ffffffff" /> </PreferenceScreen>
At the same time Custom background and Matrix Animation don't workCode:<string-array name="crop_entries"> <item>Centered adjusted</item> <item>Centered</item> <item>Fit XY</item> </string-array> <string-array name="crop_values"> <item>0</item> <item>1</item> <item>2</item> </string-array> <string-array name="custom_bg_type_entries"> <item>Image</item> <item>Solid color</item> <item>Gradient</item> </string-array> <string-array name="custom_bg_type_values"> <item>0</item> <item>1</item> <item>2</item> </string-array> <string-array name="gradient_entries"> <item>From up to down</item> <item>From down to up</item> <item>From left to right</item> <item>From right to left</item> </string-array> <string-array name="gradient_values"> <item>0</item> <item>1</item> <item>2</item> <item>3</item> </string-array>
hey bro, i've tried to apply this mod. it works great, but there is a strange issue. in fact at the bottom of display (with gradient, image or matrix mod) it create a gap, the same space of a navigation bar. the problem is that my base (note fe pie) hasn't that. how can i remove this gap? thanks