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

Commit da208969 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Merging ongoing + latest notifications on phone UI to match tablets."

parents bb1e275c 7c3e39de
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -91,29 +91,6 @@
                    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/title_bar_portrait"
                    android:paddingLeft="5dp"
                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
                    android:text="@string/status_bar_ongoing_events_title"
                    />
                <com.android.systemui.statusbar.policy.NotificationRowLayout
                    android:id="@+id/ongoingItems"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    systemui:rowHeight="@dimen/notification_height"
                    />

                <TextView android:id="@+id/latestTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/title_bar_portrait"
                    android:paddingLeft="5dp"
                    android:textAppearance="@style/TextAppearance.StatusBar.Title"
                    android:text="@string/status_bar_latest_events_title"
                    />
                <com.android.systemui.statusbar.policy.NotificationRowLayout
                    android:id="@+id/latestItems"
                    android:layout_width="match_parent"
+3 −0
Original line number Diff line number Diff line
@@ -57,4 +57,7 @@

    <!-- opacity at which Notification icons will be drawn in the status bar -->
    <item type="dimen" name="status_bar_icon_drawing_alpha">40%</item>

    <!-- gap on either side of status bar notification icons -->
    <dimen name="status_bar_icon_padding">0dp</dimen>
</resources>
+6 −5
Original line number Diff line number Diff line
@@ -44,14 +44,15 @@ public class IconMerger extends LinearLayout {

        mMoreView = new StatusBarIconView(context, "more", null);
        mMoreView.set(mMoreIcon);
        addView(mMoreView, 0, new LinearLayout.LayoutParams(mIconSize, mIconSize));
        super.addView(mMoreView, 0, new LinearLayout.LayoutParams(mIconSize, mIconSize));
    }

    public void addView(StatusBarIconView v, int index) {
        if (index == 0) {
            throw new RuntimeException("Attempt to put view before the more view: " + v);
    public void addView(StatusBarIconView v, int index, LinearLayout.LayoutParams p) {
        super.addView(v, index+1, p);
    }
        addView(v, index, new LinearLayout.LayoutParams(mIconSize, mIconSize));

    public void addView(StatusBarIconView v, int index) {
        super.addView(v, index+1, new LinearLayout.LayoutParams(mIconSize, mIconSize));
    }

    @Override
+257 −109

File changed.

Preview size limit exceeded, changes collapsed.

+8 −1
Original line number Diff line number Diff line
@@ -324,7 +324,14 @@ public class NotificationRowLayout extends ViewGroup implements SwipeHelper.Call
            if (child.getVisibility() == GONE) {
                continue;
            }
            final int thisRowHeight = (int)(child.getAlpha() * mRowHeight);
            float alpha = child.getAlpha();
            if (alpha > 1.0f) {
                if (DEBUG) {
                    Slog.w(TAG, "alpha=" + alpha + " > 1!!! " + child);
                }
                alpha = 1f;
            }
            final int thisRowHeight = (int)(alpha * mRowHeight);
            if (DEBUG) {
                Slog.d(TAG, String.format(
                            "laying out child #%d: (0, %d, %d, %d) h=%d",