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

Commit 644aad28 authored by Liam Lee Pong Lam's avatar Liam Lee Pong Lam Committed by Android (Google) Code Review
Browse files

Merge "Implement focus state on personal/work tab button" into main

parents 409b62cb d4488bfd
Loading
Loading
Loading
Loading
+19 −30
Original line number Diff line number Diff line
@@ -13,36 +13,25 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/accent_ripple_color">

    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
            <solid android:color="@color/accent_ripple_color" />
        </shape>
    </item>

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/all_apps_tabs_background_unselected_focused" android:state_focused="true" android:state_selected="false" />
    <item android:drawable="@drawable/all_apps_tabs_background_selected_focused" android:state_focused="true" android:state_selected="true" />
    <item android:id="@+id/unselected" android:state_focused="false" android:state_selected="false">
        <ripple android:color="@color/accent_ripple_color">
            <item>
                <selector android:enterFadeDuration="100">
            <item
                android:id="@+id/unselected"
                android:state_selected="false">
                <shape android:shape="rectangle">
                    <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
                    <solid android:color="?attr/materialColorSurfaceBright" />
                </shape>
                    <item android:drawable="@drawable/all_apps_tabs_background_unselected" />
                </selector>
            </item>

            <item
                android:id="@+id/selected"
                android:state_selected="true">
                <shape android:shape="rectangle">
                    <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
                    <solid android:color="?attr/materialColorPrimary" />
                </shape>
        </ripple>
    </item>
    <item android:id="@+id/selected" android:state_focused="false" android:state_selected="true">
        <ripple android:color="@color/accent_ripple_color">
            <item>
                <selector android:enterFadeDuration="100">
                    <item android:drawable="@drawable/all_apps_tabs_background_selected" />
                </selector>
            </item>

        </ripple>
    </item>
</selector>
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2024 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item
        android:bottom="@dimen/all_apps_tabs_focus_width"
        android:end="@dimen/all_apps_tabs_focus_width"
        android:start="@dimen/all_apps_tabs_focus_width"
        android:top="@dimen/all_apps_tabs_focus_width">
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
            <solid android:color="?attr/materialColorPrimary" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2024 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <corners android:radius="16dp" />
            <solid android:color="?attr/materialColorPrimary" />
        </shape>
    </item>

    <item
        android:bottom="@dimen/all_apps_tabs_focus_border"
        android:end="@dimen/all_apps_tabs_focus_border"
        android:start="@dimen/all_apps_tabs_focus_border"
        android:top="@dimen/all_apps_tabs_focus_border">
        <shape android:shape="rectangle">
            <corners android:radius="13dp" />
            <solid android:color="?attr/materialColorPrimary" />
            <stroke
                android:width="@dimen/all_apps_tabs_focus_padding"
                android:color="?attr/materialColorSurfaceDim" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2024 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
     <item
        android:bottom="@dimen/all_apps_tabs_focus_width"
        android:end="@dimen/all_apps_tabs_focus_width"
        android:start="@dimen/all_apps_tabs_focus_width"
        android:top="@dimen/all_apps_tabs_focus_width">
        <shape android:shape="rectangle">
            <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
            <solid android:color="?attr/materialColorSurfaceBright" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2024 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <corners android:radius="16dp" />
            <solid android:color="?attr/materialColorPrimary" />
        </shape>
    </item>

    <item
        android:bottom="@dimen/all_apps_tabs_focus_border"
        android:end="@dimen/all_apps_tabs_focus_border"
        android:start="@dimen/all_apps_tabs_focus_border"
        android:top="@dimen/all_apps_tabs_focus_border">
        <shape android:shape="rectangle">
            <corners android:radius="13dp" />
            <solid android:color="?attr/materialColorSurfaceBright" />
            <stroke
                android:width="@dimen/all_apps_tabs_focus_padding"
                android:color="?attr/materialColorSurfaceDim" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
Loading