Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
1,553 additions
and
103 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
|
||
defaultConfig { | ||
|
||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode rootProject.ext.versionCode | ||
versionName rootProject.ext.versionName | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
|
||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
def lib = rootProject.ext | ||
|
||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
implementation "com.android.support:appcompat-v7:$lib.appcompatV7" | ||
|
||
implementation project(":lib_base") | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.zinc.code8_canvas_clip"> | ||
|
||
<application> | ||
|
||
<activity android:name=".activity.ClientActivity"/> | ||
<activity android:name=".activity.HeartActivity" /> | ||
<activity android:name=".activity.ClipOpContentActivity" /> | ||
<activity android:name=".activity.ClipOpListActivity" /> | ||
<activity android:name=".activity.ClipOutActivity"/> | ||
<activity android:name=".activity.ClipActivity"/> | ||
|
||
</application> | ||
|
||
</manifest> |
40 changes: 40 additions & 0 deletions
40
code8_canvas_clip/src/main/java/com/zinc/code8_canvas_clip/activity/ClientActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.zinc.code8_canvas_clip.activity; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.zinc.code8_canvas_clip.R; | ||
|
||
/** | ||
* author : zinc | ||
* time : 2019/4/26 下午12:53 | ||
* desc : | ||
* version : | ||
*/ | ||
public class ClientActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_canvas_clip_client); | ||
} | ||
|
||
public void onHeart(View view) { | ||
startActivity(new Intent(this, HeartActivity.class)); | ||
} | ||
|
||
public void onClip(View view) { | ||
startActivity(new Intent(this, ClipActivity.class)); | ||
} | ||
|
||
public void onClipOut(View view) { | ||
startActivity(new Intent(this, ClipOutActivity.class)); | ||
} | ||
|
||
public void onClipPathWithOp(View view) { | ||
startActivity(new Intent(this, ClipOpListActivity.class)); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
code8_canvas_clip/src/main/java/com/zinc/code8_canvas_clip/activity/ClipActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.zinc.code8_canvas_clip.activity; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
|
||
import com.zinc.code8_canvas_clip.widget.ClipPathView; | ||
|
||
/** | ||
* author : zinc | ||
* time : 2019/4/27 上午10:10 | ||
* desc : | ||
* version : | ||
*/ | ||
public class ClipActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(new ClipPathView(this)); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
..._canvas_clip/src/main/java/com/zinc/code8_canvas_clip/activity/ClipOpContentActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.zinc.code8_canvas_clip.activity; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
|
||
import com.zinc.code8_canvas_clip.widget.ClipOpView; | ||
|
||
/** | ||
* author : zinc | ||
* time : 2019/4/26 下午12:35 | ||
* desc : | ||
* version : | ||
*/ | ||
public class ClipOpContentActivity extends Activity { | ||
|
||
public static final String CLIP = "CLIP"; | ||
|
||
private ClipOpView mClipOpView; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
mClipOpView = new ClipOpView(this); | ||
setContentView(mClipOpView); | ||
|
||
String clip = getIntent().getStringExtra(CLIP); | ||
mClipOpView.setType(clip); | ||
|
||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
code8_canvas_clip/src/main/java/com/zinc/code8_canvas_clip/activity/ClipOpListActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.zinc.code8_canvas_clip.activity; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.zinc.code8_canvas_clip.widget.ClipOpView; | ||
import com.zinc.code8_canvas_clip.R; | ||
|
||
/** | ||
* author : zinc | ||
* time : 2019/4/26 下午12:36 | ||
* desc : | ||
* version : | ||
*/ | ||
public class ClipOpListActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_clip_list); | ||
} | ||
|
||
public void onDifference(View view) { | ||
goToClipView(ClipOpView.DIFFERENCE); | ||
} | ||
|
||
public void onIntersect(View view) { | ||
goToClipView(ClipOpView.INTERSECT); | ||
} | ||
|
||
public void onUnion(View view) { | ||
goToClipView(ClipOpView.UNION); | ||
} | ||
|
||
public void onXor(View view) { | ||
goToClipView(ClipOpView.XOR); | ||
} | ||
|
||
public void onReverseDifference(View view) { | ||
goToClipView(ClipOpView.REVERSE_DIFFERENCE); | ||
} | ||
|
||
public void onReplace(View view) { | ||
goToClipView(ClipOpView.REPLACE); | ||
} | ||
|
||
private void goToClipView(String type) { | ||
Intent intent = new Intent(this, ClipOpContentActivity.class); | ||
intent.putExtra(ClipOpContentActivity.CLIP, type); | ||
|
||
startActivity(intent); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
code8_canvas_clip/src/main/java/com/zinc/code8_canvas_clip/activity/ClipOutActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.zinc.code8_canvas_clip.activity; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
|
||
import com.zinc.code8_canvas_clip.widget.ClipOutPathView; | ||
|
||
/** | ||
* author : zinc | ||
* time : 2019/4/27 上午10:10 | ||
* desc : | ||
* version : | ||
*/ | ||
public class ClipOutActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(new ClipOutPathView(this)); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
code8_canvas_clip/src/main/java/com/zinc/code8_canvas_clip/activity/HeartActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.zinc.code8_canvas_clip.activity; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import com.zinc.code8_canvas_clip.widget.HeartView; | ||
import com.zinc.code8_canvas_clip.R; | ||
|
||
/** | ||
* author : zinc | ||
* time : 2019/4/21 上午9:29 | ||
* desc : | ||
* version : | ||
*/ | ||
public class HeartActivity extends Activity { | ||
|
||
private HeartView heartView; | ||
private TextView tvStart; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_canvas_heart); | ||
|
||
heartView = findViewById(R.id.heart_view); | ||
tvStart = findViewById(R.id.tv_start); | ||
|
||
tvStart.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
heartView.start(); | ||
} | ||
}); | ||
} | ||
} |
Oops, something went wrong.