1
1
package com .example .puree ;
2
2
3
- import android .support .v7 .app .ActionBarActivity ;
4
3
import android .os .Bundle ;
4
+ import android .support .v7 .app .ActionBarActivity ;
5
5
import android .view .Menu ;
6
6
import android .view .MenuItem ;
7
7
import android .view .View ;
8
8
import android .widget .Button ;
9
9
import android .widget .TextView ;
10
10
11
11
import com .cookpad .puree .Puree ;
12
- import com .cookpad .puree .plugins .OutLogcat ;
13
12
import com .example .puree .logs .ClickLog ;
14
13
import com .example .puree .logs .PvLog ;
15
14
import com .example .puree .logs .plugins .OutBufferedDisplay ;
20
19
21
20
public class MainActivity extends ActionBarActivity {
22
21
private TextView logDisplayTextView ;
23
- private Button logDisplayButton ;
24
- private Button logBufferedDisplayButton ;
22
+ private Button button1 ;
23
+ private Button button2 ;
25
24
26
25
private final OutDisplay .Callback outDisplayCallback = new OutDisplay .Callback () {
27
26
@ Override
@@ -57,7 +56,7 @@ protected void onCreate(Bundle savedInstanceState) {
57
56
findViews ();
58
57
OutDisplay .register (outDisplayCallback );
59
58
OutBufferedDisplay .register (outBufferedDisplayCallback );
60
- Puree .send (new PvLog (this ), OutLogcat . TYPE );
59
+ Puree .send (new PvLog (this ));
61
60
setupViews ();
62
61
}
63
62
@@ -70,21 +69,21 @@ protected void onDestroy() {
70
69
71
70
private void findViews () {
72
71
logDisplayTextView = (TextView ) findViewById (R .id .log_display );
73
- logDisplayButton = (Button ) findViewById (R .id .display_button );
74
- logBufferedDisplayButton = (Button ) findViewById (R .id .buffered_display_button );
72
+ button1 = (Button ) findViewById (R .id .button1 );
73
+ button2 = (Button ) findViewById (R .id .button2 );
75
74
}
76
75
77
76
private void setupViews () {
78
- logDisplayButton .setOnClickListener (new View .OnClickListener () {
77
+ button1 .setOnClickListener (new View .OnClickListener () {
79
78
@ Override
80
79
public void onClick (View view ) {
81
- Puree .send (new ClickLog ("MainActivity" , "track" ), OutDisplay . TYPE );
80
+ Puree .send (new ClickLog ("MainActivity" , "BUTTON 1" ) );
82
81
}
83
82
});
84
- logBufferedDisplayButton .setOnClickListener (new View .OnClickListener () {
83
+ button2 .setOnClickListener (new View .OnClickListener () {
85
84
@ Override
86
85
public void onClick (View view ) {
87
- Puree .send (new ClickLog ("MainActivity" , "track" ), OutBufferedDisplay . TYPE );
86
+ Puree .send (new ClickLog ("MainActivity" , "BUTTON 2" ) );
88
87
}
89
88
});
90
89
}
0 commit comments