1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2016 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<!-- This layout file is copied from Leanback library and used to override the original layout.
19     Be cautious to change this layout to prevent weird UI behavior -->
20<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
21    xmlns:lb="http://schemas.android.com/apk/res-auto"
22    android:layout_width="match_parent"
23    android:layout_height="wrap_content"
24    android:paddingStart="@dimen/lb_details_overview_margin_start"
25    android:paddingEnd="@dimen/lb_details_overview_margin_end"
26    android:paddingBottom="@dimen/lb_details_overview_margin_bottom"
27    android:clipToPadding="false"
28    android:focusable="true"
29    android:focusableInTouchMode="true"
30    android:descendantFocusability="afterDescendants">
31
32    <!--  Used for dimming -->
33    <FrameLayout android:id="@+id/details_frame"
34        android:layout_width="match_parent"
35        android:layout_height="@dimen/lb_details_overview_height_large"
36        android:foreground="#ffffff"
37        android:elevation="@dimen/lb_details_overview_z">
38
39        <!-- Background is applied to this inner layout -->
40        <LinearLayout android:id="@+id/details_overview"
41            android:layout_width="match_parent"
42            android:layout_height="match_parent"
43            android:orientation="horizontal">
44
45            <ImageView android:id="@+id/details_overview_image"
46                android:layout_width="wrap_content"
47                android:layout_height="match_parent"
48                android:adjustViewBounds="true"
49                android:scaleType="fitStart" />
50
51            <LinearLayout android:id="@+id/details_overview_right_panel"
52                android:layout_width="match_parent"
53                android:layout_height="match_parent"
54                android:paddingBottom="@dimen/lb_details_overview_description_margin_bottom"
55                android:orientation="vertical" >
56
57                <!-- layout_marginStart and layout_marginEnd are overridden -->
58                <androidx.leanback.widget.NonOverlappingFrameLayout
59                    android:id="@+id/details_overview_description"
60                    android:layout_width="match_parent"
61                    android:layout_height="0dp"
62                    android:layout_weight="1"
63                    android:gravity="top"
64                    android:layout_marginStart="@dimen/dvr_details_overview_description_margin_start"
65                    android:layout_marginEnd="@dimen/dvr_details_overview_description_margin_end"
66                    android:paddingTop="@dimen/lb_details_overview_description_margin_top"
67                    android:clipToPadding="false"
68                    android:clipChildren="false" />
69
70                <!-- horizontalSpacing is defined as @dimen/lb_details_overview_action_items_spacing
71                     in newer versions of Leanback Library than LC uses. -->
72                <androidx.leanback.widget.HorizontalGridView
73                    android:id="@+id/details_overview_actions"
74                    android:layout_width="match_parent"
75                    android:layout_height="wrap_content"
76                    android:gravity="center"
77                    android:clipChildren="false"
78                    android:clipToPadding="false"
79                    android:focusable="true"
80                    android:focusableInTouchMode="true"
81                    android:paddingStart="@dimen/lb_details_overview_description_margin_start"
82                    android:paddingEnd="@dimen/lb_details_overview_description_margin_end"
83                    android:horizontalSpacing="16dp"
84                    lb:rowHeight="@dimen/lb_details_overview_actions_height" />
85
86            </LinearLayout>
87        </LinearLayout>
88    </FrameLayout>
89</FrameLayout>