Skip to content

Commit

Permalink
整理代码
Browse files Browse the repository at this point in the history
  • Loading branch information
mbacuiz committed Mar 17, 2020
1 parent 387449f commit eb03188
Show file tree
Hide file tree
Showing 7 changed files with 696 additions and 415 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'

android {
buildToolsVersion '29.0.0'
buildToolsVersion '29.0.2'
compileSdkVersion 29
defaultConfig {
applicationId "per.goweii.demo.reveallayout"
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/java/per/goweii/demo/reveallayout/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,5 @@ public class MainActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewById(R.id.reveal_layout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d("RevealLayout", "onClick1");
}
});
findViewById(R.id.reveal_layout2).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d("RevealLayout", "onClick2");
}
});
}
}
259 changes: 13 additions & 246 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,254 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context=".MainActivity">

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="支持过程中回滚"
android:textColor="#232323"
android:textSize="15sp" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:id="@+id/reveal_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="不支持过程中回滚"
android:textColor="#232323"
android:textSize="15sp" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:id="@+id/reveal_layout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_follow_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_follow_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

<per.goweii.reveallayout.RevealLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="15dp"
app:rl_allowRevert="false"
app:rl_animDuration="1000"
app:rl_checkWithExpand="false"
app:rl_checked="false"
app:rl_checkedLayout="@layout/reveal_layout_like_checked"
app:rl_uncheckWithExpand="false"
app:rl_uncheckedLayout="@layout/reveal_layout_like_unchecked" />

</LinearLayout>

</LinearLayout>
<per.goweii.reveallayout.RevealLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rl_allowRevert="true"
app:rl_animDuration="1000"
app:rl_checkWithExpand="true"
app:rl_checked="false"
app:rl_checkedLayout="@layout/layout_dark"
app:rl_uncheckWithExpand="true"
app:rl_uncheckedLayout="@layout/layout_light" />

</FrameLayout>
Loading

0 comments on commit eb03188

Please sign in to comment.