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

Commit 812720dc authored by Nihanth Subramanya's avatar Nihanth Subramanya Committed by Steve Kondik
Browse files

Status bar additions

*Compact carrier label layout option (layout by rorifree)
*Option to hide scrollbar in power widget
*Make carrier label and clear button use styles for easy theming

CMParts part: http://review.cyanogenmod.com/#change,4429

Change-Id: I59186629eee43f8c1c240dd9eead450cb14291df
parent f82bd7d9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -2307,6 +2307,13 @@ public final class Settings {
         */
        public static final String LONG_VOL_BOTH_ACTION = "long_vol_both_action";

        /**
         * Whether to use compact carrier label layout
         *
         * @hide
         */
        public static final String STATUS_BAR_COMPACT_CARRIER = "status_bar_compact_carrier";

        /**
         * Whether to wake the screen with the trackball. The value is boolean (1 or 0).
         * @hide
@@ -2529,6 +2536,13 @@ public final class Settings {
         */
        public static final String EXPANDED_HIDE_ONCHANGE = "expanded_hide_onchange";

        /**
         * Hide scroll bar in power widget
         *
         * @hide
         */
        public static final String EXPANDED_HIDE_SCROLLBAR = "expanded_hide_scrollbar";

        /**
         * Notification Indicator Color
         *
+1 −4
Original line number Diff line number Diff line
@@ -64,13 +64,10 @@
                android:layout_gravity="center_vertical"
                android:layout_marginTop="4dp"
                android:layout_marginBottom="1dp"
                android:textSize="14sp"
                android:textColor="#ff000000"
                android:text="@string/status_bar_clear_all_button"
                style="?android:attr/buttonStyle"
                style="@style/StatusBar.ClearButton"
                android:paddingLeft="15dp"
                android:paddingRight="15dp"
                android:background="@android:drawable/btn_default_small"
            />
        </LinearLayout>
    </LinearLayout>
+135 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* apps/common/assets/default/default/skins/StatusBar.xml
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<com.android.systemui.statusbar.ExpandedView xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:focusable="true"
    android:descendantFocusability="afterDescendants"
    >

    <LinearLayout android:id="@+id/power_and_carrier"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingTop="3dp"
        android:paddingBottom="5dp"
        android:paddingRight="3dp"
        android:background="@drawable/title_bar_portrait"
        >
        <com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@+id/exp_power_stat"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            />
    </LinearLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        >
        <ScrollView
            android:id="@+id/scroll"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fadingEdge="none"
            android:overScrollMode="ifContentScrolls"
            >
            <com.android.systemui.statusbar.NotificationLinearLayout
                android:id="@+id/notificationLinearLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                >

                <TextView android:id="@+id/noNotificationsTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/shade_header_background"
                    android:paddingLeft="5dp"
                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
                    android:text="@string/status_bar_no_notifications_title"
                    />

                <TextView android:id="@+id/ongoingTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/shade_header_background"
                    android:paddingLeft="5dp"
                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
                    android:text="@string/status_bar_ongoing_events_title"
                    />
                <LinearLayout android:id="@+id/ongoingItems"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    />

                <TextView android:id="@+id/latestTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/shade_header_background"
                    android:paddingLeft="5dp"
                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
                    android:text="@string/status_bar_latest_events_title"
                    />
                <LinearLayout android:id="@+id/latestItems"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    />
                <TextView android:id="@+id/clear_all_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right|center_vertical"
                    android:layout_marginTop="4dp"
                    android:layout_marginBottom="1dp"
                    android:text="@string/status_bar_clear_all_button"
                    style="@style/StatusBar.ClearButton"
                    android:paddingLeft="15dp"
                    android:paddingRight="15dp"
                />
            </com.android.systemui.statusbar.NotificationLinearLayout>
        </ScrollView>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            >
            <com.android.systemui.statusbar.CarrierLabel
                 android:gravity="bottom|right|center"
                 android:textAppearance="@style/TextAppearance.StatusBar.Title"
                 android:background="@android:color/transparent"
                 android:layout_marginRight="6.0dip"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:layout_alignParentRight="true"
                 />
        </LinearLayout>

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/title_bar_shadow"
            android:scaleType="fitXY"
        />

    </FrameLayout>
</com.android.systemui.statusbar.ExpandedView>
+1 −0
Original line number Diff line number Diff line
@@ -21,4 +21,5 @@
    <drawable name="notification_header_text_color">#ff969696</drawable>
    <drawable name="notification_number_text_color">#ffffffff</drawable>
    <color name="carrier_label_text_color">#ffdfdfdf</color>
    <color name="clear_button_text_color">#ff000000</color>
</resources>
+10 −0
Original line number Diff line number Diff line
@@ -22,6 +22,16 @@
        <item name="android:textColor">@drawable/notification_header_text_color</item>
    </style>

    <style name="TextAppearance.StatusBar.CarrierLabel" parent="@android:style/TextAppearance.Large">
        <item name="android:textColor">@color/carrier_label_text_color</item>
    </style>

    <style name="StatusBar.ClearButton" parent="@android:style/Widget.Button">
        <item name="android:textColor">@color/clear_button_text_color</item>
        <item name="android:textSize">14sp</item>
        <item name="android:background">@android:drawable/btn_default_small</item>
    </style>

    <style name="TextAppearance.StatusBar.IntruderAlert"
        parent="@android:style/TextAppearance.StatusBar">
    </style>
Loading