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

Commit 8d05a43e authored by Timi Rautamäki's avatar Timi Rautamäki Committed by Bruno Martins
Browse files

SystemUI: make powermenu usable on TV

Change-Id: Id15ab94cfdc4fb8933ecc1b2c29b84a691df60d9
parent 87dd4ffd
Loading
Loading
Loading
Loading
+83 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 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.
  -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true">
        <set>
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="50"
                android:propertyName="scaleX"
                android:valueTo="0.97"
                android:valueType="floatType" />
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="50"
                android:propertyName="scaleY"
                android:valueTo="0.97"
                android:valueType="floatType" />

        </set>
    </item>
    <item android:state_focused="true">
        <set>
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="50"
                android:propertyName="scaleX"
                android:valueTo="1.03"
                android:valueType="floatType"/>
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="50"
                android:propertyName="scaleY"
                android:valueTo="1.03"
                android:valueType="floatType"/>
        </set>
    </item>
    <item android:state_focused="false">
        <set>
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="50"
                android:propertyName="scaleX"
                android:valueTo="1.0"
                android:valueType="floatType"/>
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="50"
                android:propertyName="scaleY"
                android:valueTo="1.0"
                android:valueType="floatType"/>
        </set>
    </item>
    <item>
        <set>
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="250"
                android:propertyName="scaleX"
                android:valueTo="1"
                android:valueType="floatType" />
            <objectAnimator
                android:interpolator="@interpolator/control_state"
                android:duration="250"
                android:propertyName="scaleY"
                android:valueTo="1"
                android:valueType="floatType" />
        </set>
    </item>
</selector>
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright 2021, 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.
*/
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true">
      <shape android:shape="oval">
        <solid android:color="@color/global_actions_lite_button_background_focused"/>
      </shape>
    </item>
    <item>
      <shape android:shape="oval">
        <solid android:color="@color/global_actions_lite_button_background"/>
      </shape>
    </item>
</selector>
+5 −2
Original line number Diff line number Diff line
@@ -21,7 +21,9 @@
    android:gravity="center"
    android:layout_gravity="center"
    android:orientation="vertical"
    android:stateListAnimator="@anim/control_state_list_animator">
    android:stateListAnimator="@anim/control_state_list_animator"
    android:clipChildren="false"
    android:clipToPadding="false">
        <ImageView
            android:id="@*android:id/icon"
            android:layout_width="@dimen/global_actions_button_size"
@@ -30,7 +32,8 @@
            android:padding="@dimen/global_actions_button_padding"
            android:scaleType="centerInside"
            android:tint="@color/global_actions_lite_text"
            android:background="@drawable/global_actions_lite_button"/>
            android:background="@drawable/global_actions_lite_button"
            android:duplicateParentState="true"/>
        <TextView
            android:id="@*android:id/message"
            android:layout_width="match_parent"
+9 −3
Original line number Diff line number Diff line
@@ -20,7 +20,9 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:layout_gravity="center">
    android:layout_gravity="center"
    android:clipChildren="false"
    android:clipToPadding="false">
  <com.android.systemui.globalactions.GlobalActionsLayoutLite
      android:id="@id/global_actions_view"
      android:layout_width="wrap_content"
@@ -42,7 +44,9 @@
        android:orientation="horizontal"
        android:background="@drawable/global_actions_lite_background"
        android:padding="@dimen/global_actions_lite_padding"
        android:layoutDirection="ltr">
        android:layoutDirection="ltr"
        android:clipChildren="false"
        android:clipToPadding="false">
      <androidx.constraintlayout.helper.widget.Flow
          android:id="@+id/list_flow"
          android:layout_width="match_parent"
@@ -54,7 +58,9 @@
          app:flow_maxElementsWrap="2"
          app:flow_horizontalGap="@dimen/global_actions_lite_padding"
          app:flow_verticalGap="@dimen/global_actions_lite_padding"
          app:flow_horizontalStyle="packed"/>
          app:flow_horizontalStyle="packed"
          android:clipChildren="false"
          android:clipToPadding="false"/>
    </com.android.systemui.common.ui.view.LaunchableConstraintLayout>
  </com.android.systemui.globalactions.GlobalActionsLayoutLite>
</androidx.constraintlayout.widget.ConstraintLayout>
+6 −2
Original line number Diff line number Diff line
@@ -21,7 +21,9 @@
    android:layout_height="match_parent"
    android:gravity="center"
    android:background="@drawable/global_actions_lite_background"
    android:padding="@dimen/global_actions_lite_padding">
    android:padding="@dimen/global_actions_lite_padding"
    android:clipChildren="false"
    android:clipToPadding="false">

    <androidx.constraintlayout.helper.widget.Flow
        android:id="@+id/power_flow"
@@ -34,5 +36,7 @@
        app:flow_maxElementsWrap="2"
        app:flow_horizontalGap="@dimen/global_actions_lite_padding"
        app:flow_verticalGap="@dimen/global_actions_lite_padding"
        app:flow_horizontalStyle="packed"/>
        app:flow_horizontalStyle="packed"
        android:clipChildren="false"
        android:clipToPadding="false"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Loading