• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2021 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18
19<com.android.systemui.car.privacy.MicPrivacyChip
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    xmlns:app="http://schemas.android.com/apk/res-auto"
22    android:id="@+id/privacy_chip"
23    android:layout_width="@dimen/privacy_chip_width"
24    android:layout_height="match_parent"
25    android:visibility="gone"
26    android:paddingTop="@dimen/car_padding_1"
27    android:paddingBottom="@dimen/car_padding_1"
28    android:paddingStart="@dimen/car_padding_3"
29    android:paddingEnd="@dimen/car_padding_3"
30    android:focusable="false"
31    app:layoutDescription="@xml/mic_privacy_chip_scene">
32
33    <androidx.constraintlayout.widget.Guideline
34        android:id="@+id/max_width_guideline"
35        android:layout_width="wrap_content"
36        android:layout_height="wrap_content"
37        android:orientation="vertical"
38        app:layout_constraintGuide_end="@dimen/privacy_chip_width" />
39
40    <View
41        android:id="@+id/inactive_background"
42        android:layout_width="0dp"
43        android:layout_height="0dp"
44        android:alpha="0.0"
45        android:background="@drawable/system_bar_background_pill"
46        android:focusable="false"
47        app:layout_constraintBottom_toBottomOf="parent"
48        app:layout_constraintEnd_toEndOf="parent"
49        app:layout_constraintStart_toEndOf="parent"
50        app:layout_constraintTop_toBottomOf="parent" />
51
52    <androidx.constraintlayout.widget.Guideline
53        android:id="@+id/circular_active_indicator_vertical_guideline"
54        android:layout_width="wrap_content"
55        android:layout_height="wrap_content"
56        android:orientation="vertical"
57        app:layout_constraintGuide_end="@dimen/privacy_chip_indicator_circle_diameter" />
58
59    <androidx.constraintlayout.widget.Guideline
60        android:id="@+id/circular_active_indicator_horizontal_guideline"
61        android:layout_width="wrap_content"
62        android:layout_height="wrap_content"
63        android:orientation="horizontal"
64        app:layout_constraintGuide_end="@dimen/privacy_chip_indicator_circle_diameter" />
65
66    <View
67        android:id="@+id/active_background"
68        android:layout_width="0dp"
69        android:layout_height="0dp"
70        android:alpha="0.0"
71        android:background="@drawable/mic_privacy_chip_background_pill"
72        android:focusable="false"
73        app:layout_constraintBottom_toBottomOf="parent"
74        app:layout_constraintEnd_toEndOf="parent"
75        app:layout_constraintStart_toEndOf="parent"
76        app:layout_constraintTop_toBottomOf="parent" />
77
78    <ImageView
79        android:id="@+id/light_muted_icon"
80        android:src="@drawable/ic_mic_off_light"
81        android:visibility="gone"
82        android:layout_width="@dimen/privacy_chip_icon_size"
83        android:layout_height="@dimen/privacy_chip_icon_size"
84        android:alpha="0.0"
85        android:gravity="center"
86        android:scaleType="fitCenter"
87        android:focusable="false"
88        app:layout_constraintBottom_toBottomOf="parent"
89        app:layout_constraintEnd_toEndOf="parent"
90        app:layout_constraintStart_toEndOf="parent"
91        app:layout_constraintTop_toBottomOf="parent"
92    />
93
94    <ImageView
95        android:id="@+id/light_icon"
96        android:src="@drawable/ic_mic_light"
97        android:layout_width="@dimen/privacy_chip_icon_size"
98        android:layout_height="@dimen/privacy_chip_icon_size"
99        android:alpha="0.0"
100        android:gravity="center"
101        android:scaleType="fitCenter"
102        android:focusable="false"
103        app:layout_constraintBottom_toBottomOf="parent"
104        app:layout_constraintEnd_toEndOf="parent"
105        app:layout_constraintStart_toEndOf="parent"
106        app:layout_constraintTop_toBottomOf="parent"
107    />
108
109    <ImageView
110        android:id="@+id/dark_icon"
111        android:src="@drawable/ic_mic_dark"
112        android:layout_width="@dimen/privacy_chip_icon_size"
113        android:layout_height="@dimen/privacy_chip_icon_size"
114        android:alpha="0.0"
115        android:gravity="center"
116        android:scaleType="fitCenter"
117        android:focusable="false"
118        app:layout_constraintBottom_toBottomOf="parent"
119        app:layout_constraintEnd_toEndOf="parent"
120        app:layout_constraintStart_toEndOf="parent"
121        app:layout_constraintTop_toBottomOf="parent"
122    />
123
124    <!-- Vew to properly show rotary focus highlight for mic privacy chip. -->
125    <View
126        android:id="@+id/focus_view"
127        android:layout_width="0dp"
128        android:layout_height="0dp"
129        android:alpha="0.0"
130        android:background="@drawable/system_bar_pill_rotary_background"
131        android:focusable="true"
132        app:layout_constraintBottom_toBottomOf="parent"
133        app:layout_constraintEnd_toEndOf="parent"
134        app:layout_constraintStart_toEndOf="parent"
135        app:layout_constraintTop_toBottomOf="parent" />
136</com.android.systemui.car.privacy.MicPrivacyChip>