-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigation.java
More file actions
40 lines (28 loc) · 1.02 KB
/
Navigation.java
File metadata and controls
40 lines (28 loc) · 1.02 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
package com.example.practicemapapp;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.content.Intent;
import android.widget.TextView;
public class Navigation extends Activity{
Button go;
TextView pointA;
TextView pointB;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.navigation);
go = findViewById(R.id.go);
go.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intentViewMap = new Intent(Navigation.this, MainActivity.class);
pointA = findViewById(R.id.pointA);
pointB = findViewById(R.id.pointB);
intentViewMap.putExtra("pointA", String.valueOf(pointA));
intentViewMap.putExtra("pointB", String.valueOf(pointB));
startActivity(intentViewMap);
}
});
}
}