• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    Copyright (C) 2017 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:tools="http://schemas.android.com/tools"
20    android:layout_width="match_parent"
21    android:layout_height="wrap_content"
22    android:background="?android:colorBackground"
23    android:orientation="horizontal"
24    android:tag="noBackground">
25
26    <com.google.android.setupdesign.view.CheckableLinearLayout
27        android:id="@+id/sud_items_expandable_switch_content"
28        android:layout_width="0dp"
29        android:layout_height="wrap_content"
30        style="@style/SudItemContainer"
31        android:layout_weight="1"
32        android:background="?attr/selectableItemBackground"
33        android:baselineAligned="false"
34        android:orientation="horizontal"
35        android:paddingEnd="@dimen/sud_switch_content_padding_end"
36        android:paddingLeft="?attr/listPreferredItemPaddingLeft"
37        android:paddingRight="@dimen/sud_switch_content_padding_end"
38        android:paddingStart="?attr/listPreferredItemPaddingLeft">
39
40        <FrameLayout
41            android:id="@+id/sud_items_icon_container"
42            android:layout_width="@dimen/sud_items_icon_container_width"
43            android:layout_height="wrap_content"
44            android:layout_gravity="top"
45            android:gravity="start">
46
47            <ImageView
48                android:id="@+id/sud_items_icon"
49                android:layout_width="wrap_content"
50                android:layout_height="wrap_content"
51                tools:ignore="ContentDescription" />
52
53        </FrameLayout>
54
55        <LinearLayout
56            android:layout_width="0dp"
57            android:layout_height="wrap_content"
58            android:layout_marginBottom="@dimen/sud_items_padding_bottom_extra"
59            android:layout_weight="1"
60            android:duplicateParentState="true"
61            android:orientation="vertical">
62
63            <com.google.android.setupdesign.view.RichTextView
64                android:id="@+id/sud_items_title"
65                style="@style/SudItemTitle"
66                android:layout_width="wrap_content"
67                android:layout_height="wrap_content"
68                android:drawablePadding="@dimen/sud_expand_arrow_drawable_padding"
69                android:drawableEnd="@drawable/sud_ic_expand"
70                android:drawableRight="@drawable/sud_ic_expand"
71                android:duplicateParentState="true"
72                android:gravity="start"
73                android:labelFor="@+id/sud_items_switch"
74                android:textAlignment="viewStart"
75                tools:ignore="UnusedAttribute" />
76
77            <com.google.android.setupdesign.view.RichTextView
78                android:id="@+id/sud_items_summary"
79                style="@style/SudItemSummary"
80                android:layout_width="match_parent"
81                android:layout_height="wrap_content"
82                android:duplicateParentState="true"
83                android:gravity="start"
84                android:textAlignment="viewStart"
85                android:visibility="gone"
86                tools:ignore="UnusedAttribute" />
87
88        </LinearLayout>
89
90    </com.google.android.setupdesign.view.CheckableLinearLayout>
91
92    <View
93        android:id="@+id/sud_items_switch_divider"
94        android:layout_width="1dp"
95        android:layout_height="@dimen/sud_switch_divider_height"
96        android:layout_gravity="top"
97        android:layout_marginTop="@dimen/sud_switch_divider_padding_top"
98        android:background="?android:attr/listDivider" />
99
100    <androidx.appcompat.widget.SwitchCompat
101        android:id="@+id/sud_items_switch"
102        style="@style/SudSwitchStyle.Divided"
103        android:layout_width="wrap_content"
104        android:layout_height="match_parent"
105        android:layout_gravity="top"
106        android:gravity="top"
107        android:paddingTop="@dimen/sud_switch_padding_top" />
108
109</LinearLayout>
110