layout_player_controller_live_p.xml
3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.databinding.ObservableField"/>
<import type="android.databinding.ObservableBoolean"/>
<import type="com.cnlive.gundam.video.view.PlayerControllerView"/>
<import type="android.view.View"/>
<variable
name="title"
type="ObservableField<String>"/>
<variable
name="showController"
type="ObservableBoolean"/>
<variable
name="isPlay"
type="ObservableBoolean"/>
<variable
name="playerControllerView"
type="PlayerControllerView"/>
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#44000000"
android:visibility="@{showController.get() ? View.VISIBLE : View.GONE}">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginLeft="50dp"
android:gravity="center"
android:textColor="@android:color/white"
android:text="@{title.get()}" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/bottomLayout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#44000000"
android:layout_alignParentBottom="true"
android:visibility="@{showController.get() ? View.VISIBLE : View.GONE}">
<ImageView
android:id="@+id/playBtn"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginRight="5dp"
android:layout_marginLeft="10dp"
android:layout_centerVertical="true"
android:src="@{isPlay ? @drawable/player_play : @drawable/player_pause}"
android:onClick="@{playerControllerView.onClick}"/>
<ImageView
android:id="@+id/fullScreen"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/player_full_screen"
android:layout_alignParentRight="true"
android:onClick="@{playerControllerView.onClick}"/>
</RelativeLayout>
<ImageView
android:id="@+id/back"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/player_back"
android:layout_marginLeft="10dp"
android:onClick="@{playerControllerView.onClick}"/>
</RelativeLayout>
</layout>