Skip to content

Commit 6c05ace

Browse files
committed
see 08/08 log
1 parent 39605e1 commit 6c05ace

File tree

4 files changed

+53
-13
lines changed

4 files changed

+53
-13
lines changed

art/auc_frame.png

-8.18 KB
Loading

feature/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/bus/BusActivity.kt

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import android.os.Bundle
77
import android.support.annotation.Keep
88
import android.view.View
99
import com.blankj.common.CommonTitleActivity
10-
import com.blankj.utilcode.pkg.R
1110
import com.blankj.utilcode.util.BusUtils
11+
import com.blankj.utilcode.util.LogUtils
1212
import com.blankj.utilcode.util.Utils
1313
import kotlinx.android.synthetic.main.activity_bus.*
1414
import kotlin.random.Random
1515

16+
1617
/**
1718
* ```
1819
* author: Blankj
@@ -54,6 +55,11 @@ class BusActivity : CommonTitleActivity() {
5455
})
5556
}
5657

58+
@BusUtils.Bus(tag = "_PusNotifyData", sticky = true, threadMode = BusUtils.ThreadMode.MAIN)
59+
fun onPusNotifyData(pusNotifyData: PusNotifyData) {
60+
LogUtils.e("haha")
61+
}
62+
5763
companion object {
5864
const val TAG_BASIC_TYPE = "tag_basic_type"
5965
const val TAG_BUS = "tag_bus"
@@ -67,13 +73,13 @@ class BusActivity : CommonTitleActivity() {
6773
}
6874

6975
override fun bindTitle(): CharSequence {
70-
return getString(R.string.demo_bus)
76+
return getString(com.blankj.utilcode.pkg.R.string.demo_bus)
7177
}
7278

7379
override fun initData(bundle: Bundle?) {}
7480

7581
override fun bindLayout(): Int {
76-
return R.layout.activity_bus
82+
return com.blankj.utilcode.pkg.R.layout.activity_bus
7783
}
7884

7985
override fun initView(savedInstanceState: Bundle?, contentView: View?) {
@@ -95,33 +101,33 @@ class BusActivity : CommonTitleActivity() {
95101

96102
override fun onDebouncingClick(view: View) {
97103
when (view.id) {
98-
R.id.busRegister -> {
104+
com.blankj.utilcode.pkg.R.id.busRegister -> {
99105
BusUtils.register(this)
100106
}
101-
R.id.busUnregister -> {
107+
com.blankj.utilcode.pkg.R.id.busUnregister -> {
102108
BusUtils.unregister(this)
103109
busAboutTv.text = ""
104110
}
105-
R.id.busPost -> {
111+
com.blankj.utilcode.pkg.R.id.busPost -> {
106112
BusUtils.post(TAG_BUS, TAG_BUS)
107113
}
108-
R.id.busPostBasicType -> {
114+
com.blankj.utilcode.pkg.R.id.busPostBasicType -> {
109115
BusUtils.post(TAG_BASIC_TYPE, Random(System.currentTimeMillis()).nextInt())
110116
}
111-
R.id.busPostSticky -> {
117+
com.blankj.utilcode.pkg.R.id.busPostSticky -> {
112118
BusUtils.postSticky(TAG_STICKY_BUS, object : Callback {
113119
override fun call(): String {
114120
return TAG_STICKY_BUS
115121
}
116122
})
117123
}
118-
R.id.busPost2IoThread -> {
124+
com.blankj.utilcode.pkg.R.id.busPost2IoThread -> {
119125
BusUtils.post(TAG_IO)
120126
}
121-
R.id.busRemoveSticky -> {
127+
com.blankj.utilcode.pkg.R.id.busRemoveSticky -> {
122128
BusUtils.removeSticky(TAG_STICKY_BUS)
123129
}
124-
R.id.busStartCompare -> {
130+
com.blankj.utilcode.pkg.R.id.busStartCompare -> {
125131
BusCompareActivity.start(this)
126132
}
127133
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.blankj.utilcode.pkg.feature.bus;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* <pre>
7+
* author: blankj
8+
* blog : http://blankj.com
9+
* time : 2019/08/08
10+
* desc :
11+
* </pre>
12+
*/
13+
public class PusNotifyData implements Serializable {
14+
15+
private String pushType;
16+
private String pushID;
17+
18+
public String getPushType() {
19+
return pushType;
20+
}
21+
22+
public void setPushType(String pushType) {
23+
this.pushType = pushType;
24+
}
25+
26+
public String getPushID() {
27+
return pushID;
28+
}
29+
30+
public void setPushID(String pushID) {
31+
this.pushID = pushID;
32+
}
33+
34+
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#org.gradle.jvmargs=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
1616
org.gradle.jvmargs=-Xmx8192m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -XX:-UseGCOverheadLimit -Dfile.encoding=UTF-8
1717
org.gradle.daemon=true
18-
#org.gradle.configureondemand=true
19-
#org.gradle.parallel=true
18+
org.gradle.configureondemand=true
19+
org.gradle.parallel=true
2020

2121
#-Dorg.gradle.debug=true --no-daemon

0 commit comments

Comments
 (0)