You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.1 KiB
65 lines
2.1 KiB
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);
|
|
}
|
|
});
|
|
}
|
|
} |