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

Commit 78c5faff authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Some updates to QS prototype based on new mocks"

parents 55b720c4 94a1bf6a
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -19,14 +19,13 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/navigation_bar_size"
    android:background="@drawable/qs_customizer_background"
    android:gravity="center_horizontal">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?android:attr/colorPrimary">
        android:background="@drawable/notification_header_bg">

        <LinearLayout
            android:id="@+id/drag_buttons"
@@ -72,8 +71,8 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:navigationContentDescription="@*android:string/action_bar_up_description"
            style="?android:attr/toolbarStyle"
            android:background="?android:attr/colorPrimary" />
            android:background="@drawable/notification_header_bg"
            style="?android:attr/toolbarStyle" />
    </FrameLayout>

    <com.android.systemui.tuner.AutoScrollView
@@ -105,4 +104,10 @@
        android:elevation="@dimen/fab_elevation"
        android:background="@drawable/fab_background" />

    <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/navigation_bar_size"
        android:layout_gravity="bottom"
        android:background="#ff000000" />

</com.android.systemui.qs.customize.QSCustomizer>
+62 −53
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2015, The Android Open Source Project
** Copyright 2012, 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. 
@@ -32,55 +32,21 @@
    android:focusable="true"
    >

    <LinearLayout
        android:id="@+id/expanded_group"
        android:layout_width="match_parent"
    <com.android.systemui.qs.QuickQSPanel
        android:id="@+id/quick_qs_panel"
        android:background="#0000"
        android:layout_width="142dp"
        android:layout_height="match_parent"
        android:paddingEnd="12dp"
        android:orientation="horizontal">
        android:layout_alignParentEnd="true" />

        <com.android.systemui.statusbar.AlphaOptimizedButton android:id="@+id/alarm_status"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="4dp"
            android:drawablePadding="6dp"
            android:drawableStart="@drawable/ic_access_alarms_small"
            android:textColor="#64ffffff"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:paddingEnd="6dp"
            android:paddingStart="6dp"
            android:paddingTop="16dp"
            android:paddingBottom="16dp"
            android:background="?android:attr/selectableItemBackground"
            android:visibility="gone"
            />

        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:layout_below="@id/clock"
            systemui:datePattern="EEE"
            android:gravity="center_vertical"
            android:textSize="20sp"
            android:paddingTop="16dp"
            android:layout_marginBottom="@dimen/clock_collapsed_bottom_margin" />

        <include layout="@layout/split_clock_view"
    <LinearLayout
        android:id="@+id/expanded_group"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
            android:layout_marginStart="16dp"
            android:layout_marginTop="16dp"
            android:id="@+id/clock"
            />

        <Space
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1" />

        android:clipChildren="false"
        android:clipToPadding="false"
        android:orientation="horizontal"
        android:layout_alignParentEnd="true">
        <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
            android:id="@+id/settings_button_container"
            android:layout_width="48dp"
@@ -105,8 +71,57 @@
                android:src="@drawable/tuner" />

        </com.android.systemui.statusbar.AlphaOptimizedFrameLayout>

        <ImageView
            android:layout_width="48dp"
            android:layout_height="match_parent"
            android:src="@drawable/ic_expand_less"
            android:tint="@android:color/white" />
    </LinearLayout>

    <FrameLayout
        android:id="@+id/date_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/clock_collapsed_bottom_margin"
        android:layout_alignParentBottom="true">
        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_collapsed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:layout_below="@id/clock"
            systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm"
            />
    </FrameLayout>

    <include layout="@layout/split_clock_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_above="@id/date_group"
        android:id="@+id/clock"
        />

    <com.android.systemui.statusbar.AlphaOptimizedButton android:id="@+id/alarm_status"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_toEndOf="@id/date_group"
        android:layout_marginBottom="4dp"
        android:drawablePadding="6dp"
        android:drawableStart="@drawable/ic_access_alarms_small"
        android:textColor="#64ffffff"
        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
        android:paddingEnd="6dp"
        android:paddingStart="6dp"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        android:background="?android:attr/selectableItemBackground"
        android:visibility="gone"
        />

    <include
        android:id="@+id/qs_detail_header"
        layout="@layout/qs_detail_header"
@@ -115,12 +130,6 @@
        android:layout_alignParentBottom="true"
        />

    <com.android.systemui.qs.QuickQSPanel
        android:id="@+id/quick_qs_panel"
        android:background="#0000"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <com.android.systemui.statusbar.AlphaOptimizedImageView
        android:id="@+id/qs_detail_header_progress"
        android:src="@drawable/indeterminate_anim"
+1 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@
    <dimen name="pull_span_min">25dp</dimen>

    <dimen name="qs_tile_height">88dp</dimen>
    <dimen name="qs_new_tile_height">100dp</dimen>
    <dimen name="qs_quick_actions_height">88dp</dimen>
    <dimen name="qs_quick_actions_padding">25dp</dimen>
    <dimen name="qs_page_indicator_size">12dp</dimen>
+8 −5
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
    @Override
    public void setTileVisibility(TileRecord tile, int visibility) {
        tile.tileView.setVisibility(visibility);
//        // TODO: Do something smarter here.
//        distributeTiles();
    }

    @Override
@@ -104,8 +102,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
        for (int i = 0; i < NT; i++) {
            TileRecord tile = mTiles.get(i);
            if (tile.tile.getTileType() == QSTileView.QS_TYPE_QUICK) {
                tile.tileView.setType(QSTileView.QS_TYPE_QUICK);
                mFirstPage.mQuickQuickTiles.addView(tile.tileView);
                // Don't show any quick tiles for now.
                continue;
            }
            if (mPages.get(index).isFull()) {
@@ -161,6 +158,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
        protected void onFinishInflate() {
            super.onFinishInflate();
            mQuickQuickTiles = (LinearLayout) findViewById(R.id.quick_tile_layout);
            mQuickQuickTiles.setVisibility(View.GONE);
            mTilePage = (TilePage) findViewById(R.id.tile_page);
            // Less rows on first page, because it needs room for the quick tiles.
            mTilePage.mMaxRows = 3;
@@ -176,7 +174,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
    }

    public static class TilePage extends TileLayout {
        private int mMaxRows = 4;
        private int mMaxRows = 3;

        public TilePage(Context context, AttributeSet attrs) {
            super(context, attrs);
@@ -188,6 +186,11 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
            mMaxRows = maxRows;
        }

        @Override
        protected int getCellHeight() {
            return mContext.getResources().getDimensionPixelSize(R.dimen.qs_new_tile_height);
        }

        private void clear() {
            if (DEBUG) Log.d(TAG, "Clearing page");
            removeAllViews();
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public class QuickQSPanel extends QSPanel {
            if (tile.getTileType() == QSTileView.QS_TYPE_QUICK) {
                quickTiles.add(tile);
            }
            if (quickTiles.size() == 4) {
            if (quickTiles.size() == 2) {
                break;
            }
        }
Loading