-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsoccerRobot.java
More file actions
43 lines (33 loc) · 1.21 KB
/
soccerRobot.java
File metadata and controls
43 lines (33 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.muohio.soccerRobot;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class soccerRobot extends Activity {
public static int[] ballColors;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button video = (Button) findViewById(R.id.Button02);
video.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Bundle myBundle = new Bundle();
myBundle.putIntArray("ball", ballColors);
Intent myIntent = new Intent(getBaseContext(), RuntimeJava.class);
myIntent.putExtras(myBundle);
startActivity(myIntent);
}
});
Button cal = (Button) findViewById(R.id.Button03);
cal.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(getBaseContext(), Sample1Java.class);
startActivityForResult(myIntent, 0);
}
});
}
}