-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomePage.java
More file actions
68 lines (57 loc) · 2.39 KB
/
HomePage.java
File metadata and controls
68 lines (57 loc) · 2.39 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.example.natalie.test2;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class HomePage extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_page);
}
public void sendDisplayAboutScreen(View view){
Intent intent = new Intent(this, DisplayAboutScreenActivity.class);
startActivity(intent);
//Intent intent = new Intent(this, WebpageDisplayPage.class);
//startActivity(intent);
}
public void sendPizza(View view){
Uri location = Uri.parse("geo:0,0?q=Pizza delivery near me");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
}
public void sendChinese(View view){
Uri location = Uri.parse("geo:0,0?q=Chinese delivery near me");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
}
public void sendMexican(View view){
Uri location = Uri.parse("geo:0,0?q=Mexican delivery near me");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
}
public void sendBurger(View view){
Uri location = Uri.parse("geo:0,0?q=Burger delivery near me");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
}
public void sendSushi(View view){
Uri location = Uri.parse("geo:0,0?q=Sushi delivery near me");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
}
public void sendItalian(View view){
Uri location = Uri.parse("geo:0,0?q=Italian delivery near me");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
}
public void sendSearch(View view){
Intent intent;
EditText editText = (EditText) findViewById(R.id.edit_search);
String message = editText.getText().toString();
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + message + " delivery near me"));
startActivity(intent);
}
}