layout_player_touch.xml
2.61 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
<?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.view.View"/>
<variable
name="leftAreaMove"
type="android.databinding.ObservableBoolean"/>
<variable
name="rightAreaMove"
type="android.databinding.ObservableBoolean"/>
<variable
name="brightnessAndVolumeProgress"
type="android.databinding.ObservableInt"/>
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/operationVolumeBrightness"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/player_volumn_bg"
android:orientation="vertical"
android:padding="0dip"
android:visibility="@{(leftAreaMove.get() || rightAreaMove.get()) ? View.VISIBLE : View.GONE}">
<ImageView
android:id="@+id/operationImage"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dp"
android:contentDescription="@null"
android:src="@{leftAreaMove.get() ? @drawable/player_volume : @drawable/player_brightness}"/>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp">
<ImageView
android:id="@+id/operationFull"
android:layout_width="93dp"
android:layout_height="2dp"
android:layout_gravity="left"
android:contentDescription="@null"
android:src="#33ffffff" />
<ImageView
android:id="@+id/operationPercent"
android:layout_width="@{brightnessAndVolumeProgress.get(),default=@dimen/volumeWidthDefault}"
android:layout_height="2dp"
android:layout_gravity="left"
android:contentDescription="@null"
android:scaleType="matrix"
android:src="#ff6633"/>
</FrameLayout>
</LinearLayout>
</RelativeLayout>
</layout>