1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2021 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<!-- Demonstrates Picture-In-Picture's Source Rect Hint usage. --> 18<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"> 22 23 <FrameLayout 24 android:id="@+id/frame_layout" 25 android:layout_width="0dp" 26 android:layout_height="0dp" 27 app:layout_constraintTop_toTopOf="parent" 28 app:layout_constraintStart_toStartOf="parent" 29 app:layout_constraintEnd_toEndOf="parent" 30 app:layout_constraintBottom_toTopOf="@id/entry_source_btn"> 31 32 <VideoView 33 android:id="@+id/video_view" 34 android:layout_width="match_parent" 35 android:layout_height="wrap_content" 36 android:layout_gravity="top"/> 37 38 </FrameLayout> 39 40 <Button 41 android:id="@+id/entry_source_btn" 42 android:layout_width="0dp" 43 android:layout_height="wrap_content" 44 app:layout_constraintStart_toStartOf="parent" 45 app:layout_constraintEnd_toEndOf="parent" 46 app:layout_constraintBottom_toTopOf="@id/exit_source_btn"/> 47 48 <Button 49 android:id="@+id/exit_source_btn" 50 android:layout_width="0dp" 51 android:layout_height="wrap_content" 52 app:layout_constraintStart_toStartOf="parent" 53 app:layout_constraintEnd_toEndOf="parent" 54 app:layout_constraintBottom_toBottomOf="parent"/> 55 56</androidx.constraintlayout.widget.ConstraintLayout> 57