ADD file via upload

master
pa3fjc76b 3 years ago
parent 65321c3fea
commit 5c722890b8

@ -0,0 +1,36 @@
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);
}
}
Loading…
Cancel
Save