Remove All Ads from XDA
Honor 9 Lite
Thread Deleted Email Thread
Prev Previous Post   Next Post Next
I hope this is the correct forum

I am doing this to Cyanogenmod 11.

I want to add an option to Settings > Interface > Status Bar > Signal Status Style. I am so close to having it done, but there is one thing I am missing, and that is actually getting the radio button to switch the Icon to the correct .java. Here is what I have done so far:

Added to Setting/res/values/cm_strings.xml;
<string name="status_bar_signal_style_always">Always show type</string>
Added two lines to Settings/res/values/cm_arrays.xml;(marked with *'s)
<string-array name="entries_status_bar_signal" translatable="false">

    <string-array name="values_status_bar_signal" translatable="false">
Created a new java file named in SystemUI/src/com/android/systemui/statusbar and signal_cluster_always_view.xml in SystemUI/res/layout, respectively;

Added to SystemUI/res/layout/status_bar.xml;
<include layout="@layout/signal_cluster_always_view"
Added (changed STYLE_HIDDEN to 3) in SystemUI/src/com/android/systemui/statusbar/
public static final int STYLE_ALWAYS = 2;
Really all I am trying to do is create a setting to show network type even while WiFi is connected. This is accomplished by simply clearing this line from,
                !mWifiVisible ? View.VISIBLE : View.GONE);
and changing android:layout_marginEnd to 3dip in signal_cluster_view.xml.

I can't seem to figure out how the existing setting for a text only network icon sends that to SystemUI. I've explored in the Settings.apk source, and I think the issue may be in this line,
int signalStyle = Settings.System.getInt(resolver, Settings.System.STATUS_BAR_SIGNAL_TEXT, 0);
where it is setting the value of the option selected to Settings.System.STATUS_BAR_SIGNAL_TEXT. I think it is properly setting the value to 2, like I want, but it still sees 2 as HIDDEN instead of ALWAYS; or that it does see I want ALWAYS, but doesn't know to refer to in SystemUI.

What am I missing? Is there an easier way to do this?

Sorry if this is in the wrong thread.
Subscribe to Thread

cyanogenmod, option, settings, source, systemui

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes