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

Commit 0f0b11c8 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Basic support for notification payloads in the panel.

Line-item veto is there, but allows you to cancel some
notifications you probably shouldn't be canceling. (Should
hide the "X" in those cases.)

No preference given to "sticky" notifications, because
there's no such thing yet.

Notifications are now limited to 4 visible icons, per spec.
The implementation is a total hack for now.

Change-Id: Ibdf433ae94189117f983c510fe5e0cff0bf5c44c
parent 4e68d506
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,4 +40,5 @@ interface IStatusBarService
    void onNotificationError(String pkg, String tag, int id,
            int uid, int initialPid, String message);
    void onClearAllNotifications();
    void onNotificationClear(String pkg, String tag, int id);
}
+2.61 KiB (2.8 KiB)
Loading image diff...
+2.59 KiB (2.77 KiB)
Loading image diff...
+56 −0
Original line number Diff line number Diff line
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingTop="7dp"
        android:paddingLeft="5dp"
        >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingTop="3dp"
        >
        <!--com.android.server.status.AnimatedImageView android:id="@+id/icon" -->
        <ImageView android:id="@+id/icon"
            android:layout_width="25dp"
            android:layout_height="25dp"
            android:scaleType="fitCenter"
            android:src="@drawable/arrow_down_float"/>
        <TextView android:id="@+id/title"
            android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal"
            android:paddingLeft="4dp"
            />
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        >
        <TextView android:id="@+id/text"
            android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal"
            android:paddingLeft="4dp"
            />
        <android.widget.DateTimeView android:id="@+id/time"
            android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
            android:layout_marginLeft="4dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:paddingRight="5dp"
            />
    </LinearLayout>
</LinearLayout>
+40 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->

<resources>
    <!-- Status Bar Styles -->

    <style name="TextAppearance.StatusBar">
        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
    </style>
    <style name="TextAppearance.StatusBar.Ticker">
    </style>
    <style name="TextAppearance.StatusBar.Title">
        <item name="android:textStyle">bold</item>
    </style>

    <style name="TextAppearance.StatusBar.Icon">
        <item name="android:textStyle">bold</item>
    </style>
    <style name="TextAppearance.StatusBar.EventContent">
        <item name="android:textColor">?android:attr/textColorPrimary</item>
    </style>
    <style name="TextAppearance.StatusBar.EventContent.Title">
        <item name="android:textSize">18sp</item>
        <item name="android:textStyle">bold</item>
    </style>
</resources>
Loading