• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3
4     Copyright (C) 2018 The Android Open Source Project
5
6     Licensed under the Apache License, Version 2.0 (the "License");
7     you may not use this file except in compliance with the License.
8     You may obtain a copy of the License at
9
10          http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS,
14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15     See the License for the specific language governing permissions and
16     limitations under the License.
17-->
18<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:tools="http://schemas.android.com/tools"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    android:orientation="vertical">
24
25    <androidx.viewpager.widget.ViewPager
26        android:id="@+id/preview_viewpager"
27        android:layout_width="match_parent"
28        android:layout_height="0dp"
29        android:layout_weight="1"/>
30
31    <FrameLayout
32        android:id="@+id/indicator_container"
33        android:layout_width="match_parent"
34        android:layout_height="@dimen/indicator_container_height"
35        android:layout_gravity="bottom">
36
37        <com.android.customization.widget.PageIndicator
38            android:id="@+id/page_indicator"
39            android:layout_width="wrap_content"
40            android:layout_height="wrap_content"
41            android:layout_gravity="center" />
42
43        <FrameLayout
44            android:id="@+id/arrow_previous"
45            android:layout_width="@dimen/indicator_arrow_touch_area_size"
46            android:layout_height="@dimen/indicator_arrow_touch_area_size"
47            android:layout_gravity="center_vertical|left"
48            android:layout_marginStart="@dimen/indicator_arrow_container_margin_horizontal"
49            android:background="?android:attr/selectableItemBackgroundBorderless"
50            android:contentDescription="@string/previous_page_content_description"
51            android:visibility="gone"
52            tools:ignore="RtlHardcoded">
53
54            <ImageView
55                android:layout_width="@dimen/indicator_arrow_size"
56                android:layout_height="@dimen/indicator_arrow_size"
57                android:layout_gravity="center"
58                android:contentDescription="@null"
59                android:tint="@color/indicator_arrow_color"
60                android:src="@drawable/ic_arrow_back_24px" />
61        </FrameLayout>
62
63        <FrameLayout
64            android:id="@+id/arrow_next"
65            android:layout_width="@dimen/indicator_arrow_touch_area_size"
66            android:layout_height="@dimen/indicator_arrow_touch_area_size"
67            android:layout_gravity="center_vertical|right"
68            android:layout_marginEnd="@dimen/indicator_arrow_container_margin_horizontal"
69            android:background="?android:attr/selectableItemBackgroundBorderless"
70            android:contentDescription="@string/next_page_content_description"
71            android:visibility="gone"
72            tools:ignore="RtlHardcoded">
73
74            <ImageView
75                android:layout_width="@dimen/indicator_arrow_size"
76                android:layout_height="@dimen/indicator_arrow_size"
77                android:layout_gravity="center"
78                android:contentDescription="@null"
79                android:tint="@color/indicator_arrow_color"
80                android:src="@drawable/ic_arrow_forward_24px" />
81        </FrameLayout>
82    </FrameLayout>
83</LinearLayout>