Skip to content

Commit eb03188

Browse files
committed
整理代码
1 parent 387449f commit eb03188

File tree

7 files changed

+696
-415
lines changed

7 files changed

+696
-415
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
buildToolsVersion '29.0.0'
4+
buildToolsVersion '29.0.2'
55
compileSdkVersion 29
66
defaultConfig {
77
applicationId "per.goweii.demo.reveallayout"

app/src/main/java/per/goweii/demo/reveallayout/MainActivity.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,5 @@ public class MainActivity extends Activity {
1111
protected void onCreate(Bundle savedInstanceState) {
1212
super.onCreate(savedInstanceState);
1313
setContentView(R.layout.activity_main);
14-
findViewById(R.id.reveal_layout).setOnClickListener(new View.OnClickListener() {
15-
@Override
16-
public void onClick(View v) {
17-
Log.d("RevealLayout", "onClick1");
18-
}
19-
});
20-
findViewById(R.id.reveal_layout2).setOnClickListener(new View.OnClickListener() {
21-
@Override
22-
public void onClick(View v) {
23-
Log.d("RevealLayout", "onClick2");
24-
}
25-
});
2614
}
2715
}
Lines changed: 13 additions & 246 deletions
Original file line numberDiff line numberDiff line change
@@ -1,254 +1,21 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
77
android:orientation="horizontal"
88
tools:context=".MainActivity">
99

10-
<LinearLayout
11-
android:layout_width="0dp"
12-
android:layout_height="wrap_content"
13-
android:layout_weight="1"
14-
android:gravity="center"
15-
android:orientation="vertical">
16-
17-
<TextView
18-
android:layout_width="match_parent"
19-
android:layout_height="40dp"
20-
android:gravity="center"
21-
android:text="支持过程中回滚"
22-
android:textColor="#232323"
23-
android:textSize="15sp" />
24-
25-
<per.goweii.reveallayout.RevealLayout
26-
android:layout_width="wrap_content"
27-
android:layout_height="wrap_content"
28-
android:layout_margin="5dp"
29-
android:padding="15dp"
30-
app:rl_allowRevert="true"
31-
app:rl_animDuration="1000"
32-
app:rl_checkWithExpand="true"
33-
app:rl_checked="false"
34-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
35-
app:rl_uncheckWithExpand="true"
36-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
37-
38-
<per.goweii.reveallayout.RevealLayout
39-
android:id="@+id/reveal_layout"
40-
android:layout_width="wrap_content"
41-
android:layout_height="wrap_content"
42-
android:layout_margin="5dp"
43-
android:padding="15dp"
44-
app:rl_allowRevert="true"
45-
app:rl_animDuration="1000"
46-
app:rl_checkWithExpand="true"
47-
app:rl_checked="false"
48-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
49-
app:rl_uncheckWithExpand="false"
50-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
51-
52-
<per.goweii.reveallayout.RevealLayout
53-
android:layout_width="wrap_content"
54-
android:layout_height="wrap_content"
55-
android:layout_margin="5dp"
56-
android:padding="15dp"
57-
app:rl_allowRevert="true"
58-
app:rl_animDuration="1000"
59-
app:rl_checkWithExpand="false"
60-
app:rl_checked="false"
61-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
62-
app:rl_uncheckWithExpand="true"
63-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
64-
65-
<per.goweii.reveallayout.RevealLayout
66-
android:layout_width="wrap_content"
67-
android:layout_height="wrap_content"
68-
android:layout_margin="5dp"
69-
android:padding="15dp"
70-
app:rl_allowRevert="true"
71-
app:rl_animDuration="1000"
72-
app:rl_checkWithExpand="false"
73-
app:rl_checked="false"
74-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
75-
app:rl_uncheckWithExpand="false"
76-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
77-
78-
<per.goweii.reveallayout.RevealLayout
79-
android:layout_width="wrap_content"
80-
android:layout_height="wrap_content"
81-
android:layout_margin="5dp"
82-
android:padding="15dp"
83-
app:rl_allowRevert="true"
84-
app:rl_animDuration="1000"
85-
app:rl_checkWithExpand="true"
86-
app:rl_checked="false"
87-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
88-
app:rl_uncheckWithExpand="true"
89-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
90-
91-
<per.goweii.reveallayout.RevealLayout
92-
android:layout_width="wrap_content"
93-
android:layout_height="wrap_content"
94-
android:layout_margin="5dp"
95-
android:padding="15dp"
96-
app:rl_allowRevert="true"
97-
app:rl_animDuration="1000"
98-
app:rl_checkWithExpand="true"
99-
app:rl_checked="false"
100-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
101-
app:rl_uncheckWithExpand="false"
102-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
103-
104-
<per.goweii.reveallayout.RevealLayout
105-
android:layout_width="wrap_content"
106-
android:layout_height="wrap_content"
107-
android:layout_margin="5dp"
108-
android:padding="15dp"
109-
app:rl_allowRevert="true"
110-
app:rl_animDuration="1000"
111-
app:rl_checkWithExpand="false"
112-
app:rl_checked="false"
113-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
114-
app:rl_uncheckWithExpand="true"
115-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
116-
117-
<per.goweii.reveallayout.RevealLayout
118-
android:layout_width="wrap_content"
119-
android:layout_height="wrap_content"
120-
android:layout_margin="5dp"
121-
android:padding="15dp"
122-
app:rl_allowRevert="true"
123-
app:rl_animDuration="1000"
124-
app:rl_checkWithExpand="false"
125-
app:rl_checked="false"
126-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
127-
app:rl_uncheckWithExpand="false"
128-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
129-
130-
</LinearLayout>
131-
132-
<LinearLayout
133-
android:layout_width="0dp"
134-
android:layout_height="wrap_content"
135-
android:layout_weight="1"
136-
android:gravity="center"
137-
android:orientation="vertical">
138-
139-
<TextView
140-
android:layout_width="match_parent"
141-
android:layout_height="40dp"
142-
android:gravity="center"
143-
android:text="不支持过程中回滚"
144-
android:textColor="#232323"
145-
android:textSize="15sp" />
146-
147-
<per.goweii.reveallayout.RevealLayout
148-
android:layout_width="wrap_content"
149-
android:layout_height="wrap_content"
150-
android:layout_margin="5dp"
151-
android:padding="15dp"
152-
app:rl_allowRevert="false"
153-
app:rl_animDuration="1000"
154-
app:rl_checkWithExpand="true"
155-
app:rl_checked="false"
156-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
157-
app:rl_uncheckWithExpand="true"
158-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
159-
160-
<per.goweii.reveallayout.RevealLayout
161-
android:id="@+id/reveal_layout2"
162-
android:layout_width="wrap_content"
163-
android:layout_height="wrap_content"
164-
android:layout_margin="5dp"
165-
android:padding="15dp"
166-
app:rl_allowRevert="false"
167-
app:rl_animDuration="1000"
168-
app:rl_checkWithExpand="true"
169-
app:rl_checked="false"
170-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
171-
app:rl_uncheckWithExpand="false"
172-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
173-
174-
<per.goweii.reveallayout.RevealLayout
175-
android:layout_width="wrap_content"
176-
android:layout_height="wrap_content"
177-
android:layout_margin="5dp"
178-
android:padding="15dp"
179-
app:rl_allowRevert="false"
180-
app:rl_animDuration="1000"
181-
app:rl_checkWithExpand="false"
182-
app:rl_checked="false"
183-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
184-
app:rl_uncheckWithExpand="true"
185-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
186-
187-
<per.goweii.reveallayout.RevealLayout
188-
android:layout_width="wrap_content"
189-
android:layout_height="wrap_content"
190-
android:layout_margin="5dp"
191-
android:padding="15dp"
192-
app:rl_allowRevert="false"
193-
app:rl_animDuration="1000"
194-
app:rl_checkWithExpand="false"
195-
app:rl_checked="false"
196-
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
197-
app:rl_uncheckWithExpand="false"
198-
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />
199-
200-
<per.goweii.reveallayout.RevealLayout
201-
android:layout_width="wrap_content"
202-
android:layout_height="wrap_content"
203-
android:layout_margin="5dp"
204-
android:padding="15dp"
205-
app:rl_allowRevert="false"
206-
app:rl_animDuration="1000"
207-
app:rl_checkWithExpand="true"
208-
app:rl_checked="false"
209-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
210-
app:rl_uncheckWithExpand="true"
211-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
212-
213-
<per.goweii.reveallayout.RevealLayout
214-
android:layout_width="wrap_content"
215-
android:layout_height="wrap_content"
216-
android:layout_margin="5dp"
217-
android:padding="15dp"
218-
app:rl_allowRevert="false"
219-
app:rl_animDuration="1000"
220-
app:rl_checkWithExpand="true"
221-
app:rl_checked="false"
222-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
223-
app:rl_uncheckWithExpand="false"
224-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
225-
226-
<per.goweii.reveallayout.RevealLayout
227-
android:layout_width="wrap_content"
228-
android:layout_height="wrap_content"
229-
android:layout_margin="5dp"
230-
android:padding="15dp"
231-
app:rl_allowRevert="false"
232-
app:rl_animDuration="1000"
233-
app:rl_checkWithExpand="false"
234-
app:rl_checked="false"
235-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
236-
app:rl_uncheckWithExpand="true"
237-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
238-
239-
<per.goweii.reveallayout.RevealLayout
240-
android:layout_width="wrap_content"
241-
android:layout_height="wrap_content"
242-
android:layout_margin="5dp"
243-
android:padding="15dp"
244-
app:rl_allowRevert="false"
245-
app:rl_animDuration="1000"
246-
app:rl_checkWithExpand="false"
247-
app:rl_checked="false"
248-
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
249-
app:rl_uncheckWithExpand="false"
250-
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />
251-
252-
</LinearLayout>
253-
254-
</LinearLayout>
10+
<per.goweii.reveallayout.RevealLayout
11+
android:layout_width="match_parent"
12+
android:layout_height="match_parent"
13+
app:rl_allowRevert="true"
14+
app:rl_animDuration="1000"
15+
app:rl_checkWithExpand="true"
16+
app:rl_checked="false"
17+
app:rl_checkedLayout="@layout/layout_dark"
18+
app:rl_uncheckWithExpand="true"
19+
app:rl_uncheckedLayout="@layout/layout_light" />
20+
21+
</FrameLayout>

0 commit comments

Comments
 (0)