Fix UI, Layout.

This commit is contained in:
Nezumi2711
2022-06-11 10:26:35 +07:00
parent eb7a5068c9
commit 89e46b6bd3
7 changed files with 50 additions and 35 deletions
@@ -2,6 +2,8 @@ package com.waterbase.foodify;
import android.content.Intent;
import android.os.Bundle;
import android.os.Debug;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -102,16 +104,23 @@ public class Home extends AppCompatActivity implements NavigationView.OnNavigati
viewHolder.setItemClickListener(new ItemClickListener() {
@Override
public void onClick(View view, int position, boolean isLongClick) {
//Get Category Id and send to new Activity
Intent foodList = new Intent(getBaseContext(), FoodList.class);
foodList.putExtra("CategoryId", adapter.getRef(position).getKey());
foodList.putExtra("CategoryName", model.getName());
startActivity(foodList);
try {
//Get Category Id and send to new Activity
Intent foodList = new Intent(getBaseContext(), FoodList.class);
foodList.putExtra("CategoryId", adapter.getRef(position).getKey());
foodList.putExtra("CategoryName", model.getName());
startActivity(foodList);
}catch (Exception e){
Log.d("ERROR", e.getStackTrace().toString());
}
}
});
}
};
recyler_menu.setAdapter(adapter);
}
@Override