-
Notifications
You must be signed in to change notification settings - Fork 5
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
46 changed files
with
1,841 additions
and
22 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
|
||
gradle.properties |
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[ | ||
{ | ||
"classPath": "com.dboy.slotting.example.MainActivity", | ||
"entryPoints": [ | ||
{ | ||
"methodName": "onCancel", | ||
"event": "cancelLogin" | ||
}, | ||
{ | ||
"methodName": "onLogin", | ||
"event": "userLogin" | ||
}, | ||
{ | ||
"methodName": "onCheckChange", | ||
"event": "协议:,${agree},_check:,${isChecked}" | ||
}, | ||
{ | ||
"methodName": "onDestroy", | ||
"eventMap": { | ||
"msg": "退出", | ||
"business": "${this.businessName}" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"classPath": "com.dboy.slotting.example.InfoActivity", | ||
"entryPoints": [ | ||
{ | ||
"methodName": "showInfo", | ||
"eventMap": { | ||
"msg": "用户信息", | ||
"password": "${password}", | ||
"name": "${name}" | ||
} | ||
}, | ||
{ | ||
"methodName": "closePager", | ||
"event": "关闭详情页" | ||
} | ||
] | ||
} | ||
] |
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,43 @@ | ||
[ | ||
{ | ||
"classPath": "com.dboy.slotting.example.MainActivity", | ||
"entryPoints": [ | ||
{ | ||
"methodName": "onCancel", | ||
"event": "cancelLogin" | ||
}, | ||
{ | ||
"methodName": "onLogin", | ||
"event": "userLogin" | ||
}, | ||
{ | ||
"methodName": "onCheckChange", | ||
"event": "协议:,${agree},_check:,${isChecked}" | ||
}, | ||
{ | ||
"methodName": "onDestroy", | ||
"eventMap": { | ||
"msg": "退出", | ||
"business": "${this.businessName}" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"classPath": "com.dboy.slotting.example.InfoActivity", | ||
"entryPoints": [ | ||
{ | ||
"methodName": "showInfo", | ||
"eventMap": { | ||
"msg": "用户信息", | ||
"password": "${password}", | ||
"name": "${name}" | ||
} | ||
}, | ||
{ | ||
"methodName": "closePager", | ||
"event": "关闭详情页" | ||
} | ||
] | ||
} | ||
] |
74 changes: 74 additions & 0 deletions
74
app/src/main/java/com/dboy/slotting/example/EventDemo.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,74 @@ | ||
package com.dboy.slotting.example; | ||
|
||
import android.util.Log; | ||
|
||
/** | ||
* 用来编译查看字节码 | ||
*/ | ||
@SuppressWarnings({"unused", "FieldMayBeFinal"}) | ||
public class EventDemo { | ||
|
||
private String globalString = "StringValue"; | ||
|
||
private int globalInt = 1; | ||
|
||
/** | ||
* 配置文件中的字段name=globalLong于这个不对应,所以在插入的时候会忽略fuckLong | ||
*/ | ||
private long fuckLong = 1L; | ||
|
||
private double globalDouble = 1.1; | ||
|
||
private float globalFloat = 1.2f; | ||
|
||
private char globalChar = '?'; | ||
|
||
private byte globalByte = 1; | ||
|
||
private boolean globalBoolean = false; | ||
|
||
public void event() { | ||
String localString = "我是之前的代码,测试会不会影响其他操作"; | ||
Log.d("DBoy", localString); | ||
} | ||
|
||
public void eventLocal() { | ||
int localInt = 100; | ||
String localString = "局部变量的影响"; | ||
Log.d("Dboy", "局部变量插入测试-" + localString); | ||
} | ||
|
||
public String eventReturn(boolean check, boolean isThrow) { | ||
if (isThrow) { | ||
String localThrow = "异常"; | ||
throw new NullPointerException("throwReturn"); | ||
} | ||
if (check) { | ||
String localTrue = "true"; | ||
return "eventReturn true"; | ||
} else { | ||
String localFalse = "false"; | ||
return "eventReturn false"; | ||
} | ||
} | ||
|
||
public void eventMap() { | ||
String localString = "我是之前的代码,测试会不会影响其他操作"; | ||
Log.d("DBoy", localString); | ||
} | ||
|
||
public String eventMapReturn(boolean check, boolean isThrow) { | ||
if (isThrow) { | ||
boolean localThrow = false; | ||
Log.d("DJC", "eventMapReturn: " + localThrow); | ||
throw new NullPointerException("throwReturn"); | ||
} | ||
if (check) { | ||
boolean localTrue = true; | ||
return "eventMapReturn true"; | ||
} else { | ||
String localFalse = "false"; | ||
return "eventMapReturn false"; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.