/
activity_main.xml
106 lines (102 loc) · 4.2 KB
/
activity_main.xml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:weightSum="4"
android:fitsSystemWindows="true"
tools:context=".MainActivity">
<com.dalong.library.view.LoopRotarySwitchView
android:id="@+id/mLoopRotarySwitchView"
android:layout_width="fill_parent"
android:gravity="center"
android:layout_weight="1"
android:layout_height="0dp"/>
<com.dalong.library.view.LoopRotarySwitchView
android:id="@+id/mLoopRotarySwitchView2"
android:layout_width="fill_parent"
android:gravity="center"
android:layout_weight="1"
android:layout_height="0dp">
<ImageView
android:src="@mipmap/image1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:src="@mipmap/image2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:src="@mipmap/image3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:src="@mipmap/image4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.dalong.library.view.LoopRotarySwitchView>
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="2"
android:layout_height="0dp">
<com.dalong.library.view.LoopRotarySwitchView
android:id="@+id/mLoopRotarySwitchView3"
android:layout_width="0dp"
android:gravity="center"
android:layout_weight="1"
app:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:id="@+id/loopView0_tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/colorAccent"
android:textSize="45sp"
android:text="我"/>
<TextView
android:id="@+id/loopView1_tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
android:textSize="45sp"
android:gravity="center"
android:text="爱" />
<TextView
android:id="@+id/loopView2_tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/point4"
android:textSize="45sp"
android:gravity="center"
android:text="你" />
</com.dalong.library.view.LoopRotarySwitchView>
<com.dalong.library.view.LoopRotarySwitchView
android:id="@+id/mLoopRotarySwitchView4"
android:layout_width="0dp"
android:gravity="center"
android:layout_weight="1"
app:orientation="vertical"
app:autoRotation="true"
android:layout_height="match_parent">
<ImageView
android:src="@mipmap/image1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:src="@mipmap/image2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:src="@mipmap/image3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:src="@mipmap/image4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</com.dalong.library.view.LoopRotarySwitchView>
</LinearLayout>
</LinearLayout>