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.
37 lines
1.1 KiB
37 lines
1.1 KiB
package com.example.health;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.Menu;
|
|
import android.view.MenuItem;
|
|
import android.view.View;
|
|
import com.example.health.food_grid.FoodGridActivity;
|
|
import com.example.health.foodlist.ListActivity;
|
|
|
|
public class HomeActivity extends AppCompatActivity {
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_home);
|
|
}
|
|
|
|
public void onClick(View view) {
|
|
Intent intent = new Intent();
|
|
switch (view.getId()) {
|
|
case R.id.homebutton1:
|
|
intent.setClass(HomeActivity.this, ListActivity.class);
|
|
break;
|
|
case R.id.homebutton2:
|
|
intent.setClass(HomeActivity.this, FoodGridActivity.class);
|
|
break;
|
|
case R.id.homebutton3:
|
|
intent.setClass(HomeActivity.this,network.class);
|
|
}
|
|
startActivity(intent);
|
|
}
|
|
}
|