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

Commit 7884fdb9 authored by Veeti Paananen's avatar Veeti Paananen
Browse files

Fix touch feedback and areas for status bar date & time actions

Occupy the entire height for 48dp touch targets and better touch
background appearance. Remove the redundant background and click action
from the containing layout.

Change-Id: If343e6eb429a7fef38a23c1c9a46c75a95e50ed6
parent c84a3b3c
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -30,32 +30,30 @@
        android:id="@+id/datetime"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:paddingStart="8dp"
        android:paddingEnd="8dp"
        android:background="@drawable/ic_notify_button_bg"
        android:enabled="false"
        >
        <com.android.systemui.statusbar.policy.Clock
            android:id="@+id/clock"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_height="match_parent"
            android:paddingStart="8dp"
            android:paddingEnd="4dp"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
            android:background="@drawable/ic_notify_button_bg"
            android:layout_centerVertical="true"
            android:gravity="center_vertical"
            android:clickable="true"
            />

        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_height="match_parent"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:layout_toEndOf="@id/clock"
            android:background="@drawable/ic_notify_button_bg"
            android:paddingTop="8dp"
            android:paddingBottom="8dp"
            android:layout_centerVertical="true"
            android:gravity="center_vertical"
            android:paddingStart="4dp"
            android:paddingEnd="8dp"
            />
    </RelativeLayout>

+0 −11
Original line number Diff line number Diff line
@@ -622,10 +622,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
        mHasFlipSettings = res.getBoolean(R.bool.config_hasFlipSettingsPanel);

        mDateTimeView = mNotificationPanelHeader.findViewById(R.id.datetime);
        if (mDateTimeView != null) {
            mDateTimeView.setOnClickListener(mClockClickListener);
            mDateTimeView.setEnabled(true);
        }

        mSettingsButton = (ImageView) mStatusBarWindow.findViewById(R.id.settings_button);
        if (mSettingsButton != null) {
@@ -2780,13 +2776,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
        }
    };

    private View.OnClickListener mClockClickListener = new View.OnClickListener() {
        public void onClick(View v) {
            startActivityDismissingKeyguard(
                    new Intent(Intent.ACTION_QUICK_CLOCK), true); // have fun, everyone
        }
    };

    private View.OnClickListener mNotificationButtonListener = new View.OnClickListener() {
        public void onClick(View v) {
            animateExpandNotificationsPanel();