layout_video_view.xml
1.83 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
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.databinding.ObservableBoolean"/>
<import type="android.databinding.ObservableInt"/>
<import type="android.view.ViewGroup.LayoutParams"/>
<variable
name="isPortrait"
type="ObservableBoolean"/>
<variable
name="isUgc"
type="ObservableBoolean"/>
<variable
name="videoPortraitHeight"
type="ObservableInt"/>
<variable
name="videoPortraitWidth"
type="ObservableInt"/>
</data>
<RelativeLayout
android:id="@+id/test"
android:layout_width="@{videoPortraitWidth.get(),default=@dimen/videoPortraitHeight}"
android:layout_height="@{isUgc.get() ? LayoutParams.MATCH_PARENT : (isPortrait.get() ? videoPortraitHeight.get() : LayoutParams.MATCH_PARENT),default=@dimen/videoPortraitHeight}"
android:background="@android:color/black">
<com.cnlive.libs.video.video.SwitchVideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.cnlive.gundam.video.view.PlayerTouchView
android:id="@+id/touchView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.cnlive.gundam.video.view.PlayerControllerView
android:id="@+id/controllerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.cnlive.gundam.video.view.PlayerInfoView
android:id="@+id/infoView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
</layout>