Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf4fa0c0 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

Settings: Allow disabling default allcaps state in tabtext.

  Since the allcaps state is decided via an internal
  style within android, we have to manually override
  it programatically.

  Create "config_gcf_disable_default_tabtext_allcaps"
  for this purpose.

Change-Id: I38c8bd1d50dee7c1e6440ce747368ade4e2dab29
TICKET: PAELLA-167
(cherry picked from commit ae15145f)
parent c95c478d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -106,4 +106,6 @@
    internal state machine. All MSIM devices should probably set this to "true"-->
    <bool name="config_disablePreferredNetworkSwitch" translatable="false">false</bool>

    <!-- Whether to disable allcaps default state of tabtext within datausage -->
    <bool name="config_gcf_disable_default_tabtext_allcaps">false</bool>
</resources>
+7 −0
Original line number Diff line number Diff line
@@ -681,6 +681,13 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
            mTabHost.addTab(buildTabSpec(TAB_ETHERNET, R.string.data_usage_tab_ethernet));
        }

        if (getResources().getBoolean(R.bool.config_gcf_disable_default_tabtext_allcaps)) {
            for (int i = 0; i < mTabWidget.getTabCount(); i++) {
                TextView tv = (TextView) mTabWidget.getChildAt(i).findViewById(android.R.id.title);
                tv.setAllCaps(false);
            }
        }

        final boolean noTabs = mTabWidget.getTabCount() == 0;
        final boolean multipleTabs = mTabWidget.getTabCount() > 1;
        mTabWidget.setVisibility(multipleTabs ? View.VISIBLE : View.GONE);