package com.example.foodpaal; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.firebase.ui.database.FirebaseRecyclerAdapter; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.squareup.picasso.Picasso; import android.content.res.Configuration; public class FoodMenuActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { private RecyclerView mFoodList; private DatabaseReference mDatabase; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_foodmenu); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); mFoodList = findViewById(R.id.foodList); mFoodList.setHasFixedSize(true); mFoodList.setLayoutManager(new LinearLayoutManager(this)); mDatabase = FirebaseDatabase.getInstance().getReference().child("Item"); DrawerLayout drawer = findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.addDrawerListener(toggle); toggle.syncState(); NavigationView navigationView = findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); } @Override protected void onStart() { super.onStart(); FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder> FBRA = new FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder>( Food.class, R.layout.single_itemmenu, FoodMenuActivity.FoodViewHolder.class, mDatabase) { @Override protected void populateViewHolder(FoodMenuActivity.FoodViewHolder viewHolder, Food model, int position) { viewHolder.setName(model.getName()); viewHolder.setPrice(model.getPrice()); viewHolder.setDec(model.getDesc()); viewHolder.setImage(getApplicationContext(), model.getImage()); @Override Intent singleFoodActivity = new Intent(FoodMenuActivity.this,SingleFoodActivity.class); singleFoodActivity.putExtra("FoodId",food_key); startActivity(singleFoodActivity); } }); } }; mFoodList.setAdapter(FBRA); } public static class FoodViewHolder extends RecyclerView.ViewHolder { View mView; super(itemView); mView = itemView; } TextView food_name = (TextView) mView.findViewById(R.id.foodName); food_name.setText(name); } TextView food_desc = (TextView) mView.findViewById(R.id.foodDesc); food_desc.setText(desc); } TextView food_price = (TextView) mView.findViewById(R.id.foodPrice); food_price.setText(price); } ImageView food_image = (ImageView) mView.findViewById(R.id.foodImage); Picasso.with(ctx).load(image).into(food_image); } } @Override public void onBackPressed() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); if (drawer.isDrawerOpen(GravityCompat.START)) { drawer.closeDrawer(GravityCompat.START); } else { super.onBackPressed(); } } @Override // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.food_menu, menu); return true; } @Override // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @SuppressWarnings("StatementWithEmptyBody") @Override // Handle navigation view item clicks here. int id = item.getItemId(); if (id == R.id.nav_menu_category) { } else if (id == R.id.nav_orders) { Intent menuIntent = new Intent(FoodMenuActivity.this, MyOrders.class); startActivity(menuIntent); } else if (id == R.id.logout) { Intent menuIntent = new Intent(FoodMenuActivity.this, signup_form.class); startActivity(menuIntent); } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; } }
Standard input is empty
Main.java:25: error: class FoodMenuActivity is public, should be declared in a file named FoodMenuActivity.java public class FoodMenuActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { ^ Main.java:3: error: package android.content does not exist import android.content.Context; ^ Main.java:4: error: package android.content does not exist import android.content.Intent; ^ Main.java:5: error: package android.os does not exist import android.os.Bundle; ^ Main.java:6: error: package android.support.design.widget does not exist import android.support.design.widget.NavigationView; ^ Main.java:7: error: package android.support.v4.view does not exist import android.support.v4.view.GravityCompat; ^ Main.java:8: error: package android.support.v4.widget does not exist import android.support.v4.widget.DrawerLayout; ^ Main.java:9: error: package android.support.v7.app does not exist import android.support.v7.app.ActionBarDrawerToggle; ^ Main.java:10: error: package android.support.v7.app does not exist import android.support.v7.app.AppCompatActivity; ^ Main.java:11: error: package android.support.v7.widget does not exist import android.support.v7.widget.LinearLayoutManager; ^ Main.java:12: error: package android.support.v7.widget does not exist import android.support.v7.widget.RecyclerView; ^ Main.java:13: error: package android.support.v7.widget does not exist import android.support.v7.widget.Toolbar; ^ Main.java:14: error: package android.view does not exist import android.view.Menu; ^ Main.java:15: error: package android.view does not exist import android.view.MenuItem; ^ Main.java:16: error: package android.view does not exist import android.view.View; ^ Main.java:17: error: package android.widget does not exist import android.widget.ImageView; ^ Main.java:18: error: package android.widget does not exist import android.widget.TextView; ^ Main.java:19: error: package com.firebase.ui.database does not exist import com.firebase.ui.database.FirebaseRecyclerAdapter; ^ Main.java:20: error: package com.google.firebase.database does not exist import com.google.firebase.database.DatabaseReference; ^ Main.java:21: error: package com.google.firebase.database does not exist import com.google.firebase.database.FirebaseDatabase; ^ Main.java:22: error: package com.squareup.picasso does not exist import com.squareup.picasso.Picasso; ^ Main.java:23: error: package android.content.res does not exist import android.content.res.Configuration; ^ Main.java:25: error: cannot find symbol public class FoodMenuActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { ^ symbol: class AppCompatActivity Main.java:25: error: package NavigationView does not exist public class FoodMenuActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { ^ Main.java:27: error: cannot find symbol private RecyclerView mFoodList; ^ symbol: class RecyclerView location: class FoodMenuActivity Main.java:28: error: cannot find symbol private DatabaseReference mDatabase; ^ symbol: class DatabaseReference location: class FoodMenuActivity Main.java:32: error: cannot find symbol protected void onCreate(Bundle savedInstanceState) { ^ symbol: class Bundle location: class FoodMenuActivity Main.java:126: error: cannot find symbol public boolean onCreateOptionsMenu(Menu menu) { ^ symbol: class Menu location: class FoodMenuActivity Main.java:133: error: cannot find symbol public boolean onOptionsItemSelected(MenuItem item) { ^ symbol: class MenuItem location: class FoodMenuActivity Main.java:149: error: cannot find symbol public boolean onNavigationItemSelected(MenuItem item) { ^ symbol: class MenuItem location: class FoodMenuActivity Main.java:85: error: package RecyclerView does not exist public static class FoodViewHolder extends RecyclerView.ViewHolder { ^ Main.java:86: error: cannot find symbol View mView; ^ symbol: class View location: class FoodViewHolder Main.java:88: error: cannot find symbol public FoodViewHolder(View itemView) { ^ symbol: class View location: class FoodViewHolder Main.java:108: error: cannot find symbol public void setImage(Context ctx, String image) { ^ symbol: class Context location: class FoodViewHolder Main.java:31: error: method does not override or implement a method from a supertype @Override ^ Main.java:33: error: cannot find symbol super.onCreate(savedInstanceState); ^ symbol: variable super location: class FoodMenuActivity Main.java:34: error: package R does not exist setContentView(R.layout.activity_foodmenu); ^ Main.java:35: error: cannot find symbol Toolbar toolbar = findViewById(R.id.toolbar); ^ symbol: class Toolbar location: class FoodMenuActivity Main.java:35: error: package R does not exist Toolbar toolbar = findViewById(R.id.toolbar); ^ Main.java:38: error: package R does not exist mFoodList = findViewById(R.id.foodList); ^ Main.java:40: error: cannot find symbol mFoodList.setLayoutManager(new LinearLayoutManager(this)); ^ symbol: class LinearLayoutManager location: class FoodMenuActivity Main.java:41: error: cannot find symbol mDatabase = FirebaseDatabase.getInstance().getReference().child("Item"); ^ symbol: variable FirebaseDatabase location: class FoodMenuActivity Main.java:45: error: cannot find symbol DrawerLayout drawer = findViewById(R.id.drawer_layout); ^ symbol: class DrawerLayout location: class FoodMenuActivity Main.java:45: error: package R does not exist DrawerLayout drawer = findViewById(R.id.drawer_layout); ^ Main.java:46: error: cannot find symbol ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( ^ symbol: class ActionBarDrawerToggle location: class FoodMenuActivity Main.java:46: error: cannot find symbol ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( ^ symbol: class ActionBarDrawerToggle location: class FoodMenuActivity Main.java:47: error: package R does not exist this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); ^ Main.java:47: error: package R does not exist this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); ^ Main.java:51: error: cannot find symbol NavigationView navigationView = findViewById(R.id.nav_view); ^ symbol: class NavigationView location: class FoodMenuActivity Main.java:51: error: package R does not exist NavigationView navigationView = findViewById(R.id.nav_view); ^ Main.java:56: error: method does not override or implement a method from a supertype @Override ^ Main.java:58: error: cannot find symbol super.onStart(); ^ symbol: variable super location: class FoodMenuActivity Main.java:59: error: cannot find symbol FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder> FBRA = new FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder>( Food.class, ^ symbol: class FirebaseRecyclerAdapter location: class FoodMenuActivity Main.java:59: error: cannot find symbol FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder> FBRA = new FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder>( Food.class, ^ symbol: class Food location: class FoodMenuActivity Main.java:59: error: cannot find symbol FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder> FBRA = new FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder>( Food.class, ^ symbol: class FirebaseRecyclerAdapter location: class FoodMenuActivity Main.java:59: error: cannot find symbol FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder> FBRA = new FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder>( Food.class, ^ symbol: class Food location: class FoodMenuActivity Main.java:59: error: cannot find symbol FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder> FBRA = new FirebaseRecyclerAdapter<Food, FoodMenuActivity.FoodViewHolder>( Food.class, ^ symbol: class Food location: class FoodMenuActivity Main.java:60: error: package R does not exist R.layout.single_itemmenu, ^ Main.java:94: error: cannot find symbol TextView food_name = (TextView) mView.findViewById(R.id.foodName); ^ symbol: class TextView location: class FoodViewHolder Main.java:94: error: cannot find symbol TextView food_name = (TextView) mView.findViewById(R.id.foodName); ^ symbol: class TextView location: class FoodViewHolder Main.java:94: error: package R does not exist TextView food_name = (TextView) mView.findViewById(R.id.foodName); ^ Main.java:99: error: cannot find symbol TextView food_desc = (TextView) mView.findViewById(R.id.foodDesc); ^ symbol: class TextView location: class FoodViewHolder Main.java:99: error: cannot find symbol TextView food_desc = (TextView) mView.findViewById(R.id.foodDesc); ^ symbol: class TextView location: class FoodViewHolder Main.java:99: error: package R does not exist TextView food_desc = (TextView) mView.findViewById(R.id.foodDesc); ^ Main.java:104: error: cannot find symbol TextView food_price = (TextView) mView.findViewById(R.id.foodPrice); ^ symbol: class TextView location: class FoodViewHolder Main.java:104: error: cannot find symbol TextView food_price = (TextView) mView.findViewById(R.id.foodPrice); ^ symbol: class TextView location: class FoodViewHolder Main.java:104: error: package R does not exist TextView food_price = (TextView) mView.findViewById(R.id.foodPrice); ^ Main.java:109: error: cannot find symbol ImageView food_image = (ImageView) mView.findViewById(R.id.foodImage); ^ symbol: class ImageView location: class FoodViewHolder Main.java:109: error: cannot find symbol ImageView food_image = (ImageView) mView.findViewById(R.id.foodImage); ^ symbol: class ImageView location: class FoodViewHolder Main.java:109: error: package R does not exist ImageView food_image = (ImageView) mView.findViewById(R.id.foodImage); ^ Main.java:110: error: cannot find symbol Picasso.with(ctx).load(image).into(food_image); ^ symbol: variable Picasso location: class FoodViewHolder Main.java:115: error: method does not override or implement a method from a supertype @Override ^ Main.java:117: error: cannot find symbol DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ^ symbol: class DrawerLayout location: class FoodMenuActivity Main.java:117: error: cannot find symbol DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ^ symbol: class DrawerLayout location: class FoodMenuActivity Main.java:117: error: package R does not exist DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ^ Main.java:118: error: cannot find symbol if (drawer.isDrawerOpen(GravityCompat.START)) { ^ symbol: variable GravityCompat location: class FoodMenuActivity Main.java:119: error: cannot find symbol drawer.closeDrawer(GravityCompat.START); ^ symbol: variable GravityCompat location: class FoodMenuActivity Main.java:121: error: cannot find symbol super.onBackPressed(); ^ symbol: variable super location: class FoodMenuActivity Main.java:125: error: method does not override or implement a method from a supertype @Override ^ Main.java:128: error: package R does not exist getMenuInflater().inflate(R.menu.food_menu, menu); ^ Main.java:128: error: cannot find symbol getMenuInflater().inflate(R.menu.food_menu, menu); ^ symbol: method getMenuInflater() location: class FoodMenuActivity Main.java:132: error: method does not override or implement a method from a supertype @Override ^ Main.java:140: error: package R does not exist if (id == R.id.action_settings) { ^ Main.java:144: error: cannot find symbol return super.onOptionsItemSelected(item); ^ symbol: variable super location: class FoodMenuActivity Main.java:148: error: method does not override or implement a method from a supertype @Override ^ Main.java:153: error: package R does not exist if (id == R.id.nav_menu_category) { ^ Main.java:156: error: package R does not exist } else if (id == R.id.nav_orders) { ^ Main.java:157: error: cannot find symbol Intent menuIntent = new Intent(FoodMenuActivity.this, MyOrders.class); ^ symbol: class Intent location: class FoodMenuActivity Main.java:157: error: cannot find symbol Intent menuIntent = new Intent(FoodMenuActivity.this, MyOrders.class); ^ symbol: class Intent location: class FoodMenuActivity Main.java:157: error: cannot find symbol Intent menuIntent = new Intent(FoodMenuActivity.this, MyOrders.class); ^ symbol: class MyOrders location: class FoodMenuActivity Main.java:161: error: package R does not exist } else if (id == R.id.logout) { ^ Main.java:163: error: cannot find symbol Intent menuIntent = new Intent(FoodMenuActivity.this, signup_form.class); ^ symbol: class Intent location: class FoodMenuActivity Main.java:163: error: cannot find symbol Intent menuIntent = new Intent(FoodMenuActivity.this, signup_form.class); ^ symbol: class Intent location: class FoodMenuActivity Main.java:163: error: cannot find symbol Intent menuIntent = new Intent(FoodMenuActivity.this, signup_form.class); ^ symbol: class signup_form location: class FoodMenuActivity Main.java:168: error: cannot find symbol DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ^ symbol: class DrawerLayout location: class FoodMenuActivity Main.java:168: error: cannot find symbol DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ^ symbol: class DrawerLayout location: class FoodMenuActivity Main.java:168: error: package R does not exist DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ^ Main.java:169: error: cannot find symbol drawer.closeDrawer(GravityCompat.START); ^ symbol: variable GravityCompat location: class FoodMenuActivity 98 errors
Standard output is empty