parent
4d9b8a8ca5
commit
a0e92abae2
@ -0,0 +1,65 @@
|
||||
package com.example.WhatMeal;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MainActivity extends AppCompatActivity
|
||||
{
|
||||
MenuActivity.MyHelper myHelper;
|
||||
private TextView text_food;
|
||||
private TextView text_store;
|
||||
private Button btn_eat;
|
||||
private Button btn_menu;
|
||||
private Button btn_inter;
|
||||
private Button btn_gps;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
btn_eat=(Button)findViewById(R.id.btn_eat);
|
||||
btn_eat.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent intent = new Intent(MainActivity.this, EatWhatActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
btn_menu=(Button)findViewById(R.id.btn_menu);
|
||||
btn_menu.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent intent = new Intent(MainActivity.this, MenuActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
btn_inter=(Button)findViewById(R.id.btn_inter);
|
||||
btn_inter.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent intent = new Intent(MainActivity.this, InterActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
btn_gps=(Button)findViewById(R.id.btn_gps);
|
||||
btn_gps.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent intent = new Intent(MainActivity.this, GPSActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in new issue