player.xml 3 KB
Newer Older
Michael Merg's avatar
Michael Merg committed
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="fill_parent"
Geoffrey Métais's avatar
Geoffrey Métais committed
4
    android:layout_height="fill_parent" >
5

Sébastien Toque's avatar
Sébastien Toque committed
6
7
8
9
    <!--
     the double FrameLayout is necessary here to do cropping on the bottom right
     (which requires the surface not be centered), while keeping the result centered
    -->
Geoffrey Métais's avatar
Geoffrey Métais committed
10

11
    <FrameLayout
12
        android:layout_width="match_parent"
Sébastien Toque's avatar
Sébastien Toque committed
13
14
        android:layout_height="match_parent"
        android:fitsSystemWindows="false" >
15

16
17
        <FrameLayout
            android:id="@+id/player_surface_frame"
18
19
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
20
            android:layout_gravity="center"
21
            android:foregroundGravity="clip_horizontal|clip_vertical" >
22
23
24

            <SurfaceView
                android:id="@+id/player_surface"
25
                android:layout_width="1dp"
26
                android:layout_height="1dp" />
Geoffrey Métais's avatar
Geoffrey Métais committed
27

28
29
30
            <SurfaceView
                android:id="@+id/subtitles_surface"
                android:layout_width="1dp"
31
                android:layout_height="1dp" />
32
        </FrameLayout>
33
    </FrameLayout>
34

35
    <RelativeLayout
Geoffrey Métais's avatar
Geoffrey Métais committed
36
        android:layout_width="match_parent"
37
        android:layout_height="match_parent"
38
39
40
        android:layout_marginBottom="@dimen/tv_overscan_vertical"
        android:layout_marginLeft="@dimen/tv_overscan_horizontal"
        android:layout_marginRight="@dimen/tv_overscan_horizontal"
Sébastien Toque's avatar
Sébastien Toque committed
41
        android:fitsSystemWindows="true" >
Geoffrey Métais's avatar
Geoffrey Métais committed
42

Geoffrey Métais's avatar
Geoffrey Métais committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
        <include
            android:id="@+id/player_overlay_tips"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            layout="@layout/player_tips" />

        <ImageView
            android:id="@+id/player_overlay_loading"
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:layout_centerHorizontal="true"
            android:layout_above="@+id/player_overlay_loading_text"
            android:src="@drawable/ic_cone_o" />

        <TextView
            android:id="@+id/player_overlay_loading_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_above="@+id/player_overlay_info"
            android:layout_centerHorizontal="true"
            android:textAppearance="@style/TextAppearance.AppCompat.SearchResult.Title" />

        <TextView
            android:id="@+id/player_overlay_info"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_above="@+id/progress_overlay"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:background="@drawable/video_list_length_bg"
            android:padding="5dp"
            android:textColor="#ffffff"
            android:textSize="36sp"
            android:visibility="invisible" />

        <include layout="@layout/player_hud"/>
Sébastien Toque's avatar
Sébastien Toque committed
79

80
    </RelativeLayout>
Sébastien Toque's avatar
Sébastien Toque committed
81

Geoffrey Métais's avatar
Geoffrey Métais committed
82
</RelativeLayout>