mirror of
https://github.com/rodneyosodo/uber4freefood.git
synced 2026-06-23 04:10:18 +00:00
Add food remote
This commit is contained in:
Generated
+35
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven2" />
|
||||
<option name="name" value="maven2" />
|
||||
<option name="url" value="https://plugins.gradle.org/m2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.qualis.angelapp.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.android.gms.tasks.OnFailureListener;
|
||||
import com.google.android.gms.tasks.OnSuccessListener;
|
||||
import com.google.firebase.storage.FirebaseStorage;
|
||||
import com.google.firebase.storage.StorageReference;
|
||||
import com.qualis.angelapp.Model.Food;
|
||||
import com.qualis.angelapp.R;
|
||||
import com.qualis.angelapp.ViewHolder.FoodViewHolder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FoodItemAdapter extends RecyclerView.Adapter {
|
||||
|
||||
FirebaseStorage storage;
|
||||
StorageReference storageReference;
|
||||
|
||||
private Context context;
|
||||
private List<Food> foodListItems;
|
||||
|
||||
public FoodItemAdapter(Context context, List<Food> foodListItems) {
|
||||
this.context = context;
|
||||
this.foodListItems = foodListItems;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
|
||||
View view = inflater.inflate(R.layout.food_item, parent, false);
|
||||
return new FoodViewHolder(view);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, int position) {
|
||||
Food foodItem = foodListItems.get(position);
|
||||
|
||||
((FoodViewHolder)holder).foodName.setText(foodItem.getFoodName());
|
||||
((FoodViewHolder)holder).foodServing.setText("Serves: " + foodItem.getServing());
|
||||
|
||||
storage = FirebaseStorage.getInstance();
|
||||
storageReference = storage.getReference("ProfilePictures/").child("foodImages");
|
||||
|
||||
|
||||
storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
|
||||
@Override
|
||||
public void onSuccess(Uri uri) {
|
||||
String imgURL = uri.toString();
|
||||
Glide.with(context).load(imgURL).into(((FoodViewHolder)holder).foodImage);
|
||||
}
|
||||
}).addOnFailureListener(new OnFailureListener() {
|
||||
@Override
|
||||
public void onFailure(@NonNull Exception exception) {
|
||||
// Handle any errors
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return foodListItems.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
package com.qualis.angelapp;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.volley.AuthFailureError;
|
||||
import com.android.volley.Request;
|
||||
import com.android.volley.RequestQueue;
|
||||
import com.android.volley.Response;
|
||||
import com.android.volley.VolleyError;
|
||||
import com.android.volley.toolbox.JsonObjectRequest;
|
||||
import com.android.volley.toolbox.Volley;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.storage.FirebaseStorage;
|
||||
import com.google.firebase.storage.StorageReference;
|
||||
import com.google.firebase.storage.UploadTask;
|
||||
import com.google.gson.Gson;
|
||||
import com.qualis.angelapp.Common.Common;
|
||||
import com.qualis.angelapp.Model.User;
|
||||
import com.qualis.angelapp.Tools.Converter;
|
||||
import com.rengwuxian.materialedittext.MaterialEditText;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import life.sabujak.roundedbutton.RoundedButton;
|
||||
|
||||
public class AddFood2Activity extends AppCompatActivity {
|
||||
|
||||
StorageReference firebaseStorageReference = FirebaseStorage.getInstance().getReference();
|
||||
|
||||
ImageView arrowBack;
|
||||
RoundedButton btnAddFood2;
|
||||
com.rengwuxian.materialedittext.MaterialEditText edtFoodDescription, edtSpecialIngredients, edtFoodServing, edtSpecialNote;
|
||||
ProgressDialog progressDialog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_add_food2);
|
||||
|
||||
|
||||
edtFoodDescription = (MaterialEditText)findViewById(R.id.edtFoodDescription);
|
||||
edtSpecialIngredients = (MaterialEditText)findViewById(R.id.edtSpecialIngredients);
|
||||
edtFoodServing = (MaterialEditText)findViewById(R.id.edtFoodServing);
|
||||
edtSpecialNote = (MaterialEditText)findViewById(R.id.edtSpecialNote);
|
||||
|
||||
arrowBack = (ImageView)findViewById(R.id.arrowBack);
|
||||
btnAddFood2 = (RoundedButton)findViewById(R.id.btnAddFood2);
|
||||
|
||||
|
||||
HashMap<String, String> mapSecondPage = new HashMap();
|
||||
|
||||
mapSecondPage = (HashMap<String, String>) getIntent().getSerializableExtra("hashMap");
|
||||
|
||||
Bundle extras = getIntent().getExtras();
|
||||
final byte[] byteArray = extras.getByteArray("picture");
|
||||
|
||||
Toast.makeText(this, mapSecondPage.toString(),Toast.LENGTH_LONG).show();
|
||||
|
||||
|
||||
|
||||
final HashMap<String, String> finalMapSecondPage = mapSecondPage;
|
||||
|
||||
btnAddFood2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String foodDescription = edtFoodDescription.getText().toString();
|
||||
String specialIngredients = edtSpecialIngredients.getText().toString();
|
||||
String foodServing = edtFoodServing.getText().toString().trim();
|
||||
String specialNote = edtSpecialNote.getText().toString();
|
||||
|
||||
|
||||
if (TextUtils.isEmpty(foodDescription) || TextUtils.isEmpty(specialIngredients) || TextUtils.isEmpty(foodServing) || TextUtils.isEmpty(specialNote)){
|
||||
Toast.makeText(AddFood2Activity.this,"Kindly fill all details to proceed",Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault());
|
||||
String currentDateTime = dateTimeFormat.format(new Date());
|
||||
|
||||
final String foodImageid = finalMapSecondPage.get("FoodName") + currentDateTime;
|
||||
|
||||
|
||||
|
||||
StorageReference profilePicRef = firebaseStorageReference.child("FoodImages").child(foodImageid);
|
||||
UploadTask uploadTask = profilePicRef.putBytes(byteArray);
|
||||
|
||||
finalMapSecondPage.put("Description", foodDescription);
|
||||
finalMapSecondPage.put("SpecialIngredients", specialIngredients);
|
||||
finalMapSecondPage.put("FoodServing",foodServing);
|
||||
finalMapSecondPage.put("FoodImageId", foodImageid);
|
||||
finalMapSecondPage.put("SpecialNote", specialNote);
|
||||
finalMapSecondPage.put("locationLat", "-1.320163");
|
||||
finalMapSecondPage.put("locationLong", "36.704049");
|
||||
finalMapSecondPage.put("status", "Inactive");
|
||||
|
||||
|
||||
uploadTask.addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {
|
||||
Toast.makeText(AddFood2Activity.this, foodImageid,Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
addFoodRequest(finalMapSecondPage);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addFoodRequest(final Map data) throws JSONException {
|
||||
|
||||
final RequestQueue requestQueue = Volley.newRequestQueue(this);
|
||||
String URL = "https://e4e7a0533d9f.ngrok.io/food";
|
||||
|
||||
Gson gson = new Gson();
|
||||
String json = gson.toJson(data);
|
||||
|
||||
|
||||
JsonObjectRequest jsonObjReq = new JsonObjectRequest(
|
||||
Request.Method.POST, URL, new JSONObject(json),
|
||||
new Response.Listener<JSONObject>() {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
Toast.makeText(AddFood2Activity.this, response.toString(), Toast.LENGTH_LONG).show();
|
||||
try {
|
||||
addFoodCheck(response);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}, new Response.ErrorListener() {
|
||||
|
||||
@Override
|
||||
public void onErrorResponse(VolleyError error) {
|
||||
|
||||
}
|
||||
}) {
|
||||
|
||||
//Request headers
|
||||
|
||||
@Override
|
||||
public Map<String, String> getHeaders() throws AuthFailureError {
|
||||
HashMap<String, String> headers = new HashMap<String, String>();
|
||||
headers.put("Content-Type", "application/json; charset=utf-8");
|
||||
return headers;
|
||||
}
|
||||
|
||||
};
|
||||
requestQueue.add(jsonObjReq);
|
||||
|
||||
}
|
||||
private void addFoodCheck( JSONObject response) throws IOException {
|
||||
|
||||
String message = null;
|
||||
try {
|
||||
message = response.getString("message");
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Boolean status = null;
|
||||
try {
|
||||
status = response.getBoolean("status");
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if(message.equals("Food has been created") && status == true){
|
||||
|
||||
|
||||
|
||||
Intent mainActivity = new Intent(AddFood2Activity.this, MainActivity.class);
|
||||
mainActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(mainActivity);
|
||||
|
||||
|
||||
|
||||
|
||||
}else {
|
||||
Toast.makeText(AddFood2Activity.this, message, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.qualis.angelapp;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.firebase.storage.FirebaseStorage;
|
||||
import com.google.firebase.storage.StorageReference;
|
||||
import com.rengwuxian.materialedittext.MaterialEditText;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.HashMap;
|
||||
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
import life.sabujak.roundedbutton.RoundedButton;
|
||||
|
||||
public class AddFoodActivity extends AppCompatActivity {
|
||||
|
||||
static final int REQUEST_TAKE_PHOTO = 1;
|
||||
byte[] imgdata;
|
||||
|
||||
|
||||
MaterialEditText edtFoodName, edtDietType;
|
||||
|
||||
TextView txtCameraInvoke;
|
||||
RoundedButton btnAddFood1;
|
||||
ImageView foodImage;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_add_food);
|
||||
|
||||
|
||||
|
||||
edtFoodName = (MaterialEditText)findViewById(R.id.edtFoodName);
|
||||
edtDietType = (MaterialEditText)findViewById(R.id.edtDietType);
|
||||
btnAddFood1 =(RoundedButton)findViewById(R.id.btnAddFood1);
|
||||
foodImage = (ImageView) findViewById(R.id.imgFoodPhoto);
|
||||
txtCameraInvoke = (TextView)findViewById(R.id.cameraInvoke);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
txtCameraInvoke.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent takePhoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
startActivityForResult(takePhoto, REQUEST_TAKE_PHOTO);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
btnAddFood1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String foodName = edtFoodName.getText().toString().trim();
|
||||
String foodDietType = edtDietType.getText().toString().trim();
|
||||
|
||||
|
||||
if (TextUtils.isEmpty(foodName) || TextUtils.isEmpty(foodDietType) || imgdata == null){
|
||||
Toast.makeText(AddFoodActivity.this,"Kindly fill all details to proceed",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else{
|
||||
HashMap<String, String> mapFirstPage = new HashMap<>();
|
||||
mapFirstPage.put("FoodName", foodName);
|
||||
mapFirstPage.put("DietType", foodDietType);
|
||||
|
||||
|
||||
Intent addFood2 = new Intent(AddFoodActivity.this, AddFood2Activity.class);
|
||||
addFood2.putExtra("hashMap", mapFirstPage);
|
||||
addFood2.putExtra("picture", imgdata);
|
||||
startActivity(addFood2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == REQUEST_TAKE_PHOTO && resultCode == RESULT_OK) {
|
||||
|
||||
if (requestCode == REQUEST_TAKE_PHOTO) {
|
||||
Uri uri = data.getData();
|
||||
Bundle extras = data.getExtras();
|
||||
Bitmap imageBitmap = (Bitmap) extras.get("data");
|
||||
foodImage.setImageBitmap(imageBitmap);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
imageBitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);
|
||||
byte[] databaos = baos.toByteArray();
|
||||
|
||||
imgdata = databaos;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.qualis.angelapp.Interface;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface ItemClickListener {
|
||||
|
||||
void onClick(View view, int position, boolean isLongClick);
|
||||
}
|
||||
@@ -78,8 +78,9 @@ public class LoginActivity extends AppCompatActivity {
|
||||
Toast.makeText(LoginActivity.this,"Password cannot be less that 8 characters",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else{
|
||||
progressDialog = new ProgressDialog(LoginActivity.this);
|
||||
progressDialog = new ProgressDialog(LoginActivity.this, R.style.ProgressDialogStyle);
|
||||
progressDialog.setMessage("Please Wait..");
|
||||
progressDialog.setCancelable(true);
|
||||
progressDialog.show();
|
||||
|
||||
Converter pwdConverter = new Converter();
|
||||
@@ -107,7 +108,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||
private void loginRequest(final String uname, final String pwd) throws JSONException {
|
||||
|
||||
final RequestQueue requestQueue = Volley.newRequestQueue(this);
|
||||
String URL = "https://74c72ed8ab17.ngrok.io/api/user/login";
|
||||
String URL = "https://531b2bd6364b.ngrok.io/api/user/login";
|
||||
|
||||
Map<String, String> dataMap = new HashMap<>();
|
||||
dataMap.put("email", uname);
|
||||
|
||||
@@ -131,7 +131,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||
// Handle navigation view item clicks here.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == R.id.nav_browse) {
|
||||
if (id == R.id.nav_add_food) {
|
||||
Intent addFood = new Intent(MainActivity.this, AddFoodActivity.class);
|
||||
startActivity(addFood);
|
||||
|
||||
} else if (id == R.id.nav_active_food) {
|
||||
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.qualis.angelapp.Model;
|
||||
|
||||
public class Food {
|
||||
|
||||
|
||||
private String foodId;
|
||||
private String foodName;
|
||||
private String dietType;
|
||||
|
||||
private String angelUserID;
|
||||
private String humanUserID;
|
||||
|
||||
private String description;
|
||||
private String specialIngredients;
|
||||
private String serving;
|
||||
private String specialNote;
|
||||
private String foodImageId;
|
||||
|
||||
private String locationLat;
|
||||
private String locationLong;
|
||||
|
||||
private String createdAt;
|
||||
private String deletedAt;
|
||||
private String updatedAt;
|
||||
|
||||
private String status;
|
||||
|
||||
|
||||
public Food() {
|
||||
}
|
||||
|
||||
public Food(String foodId, String foodName, String dietType, String angelUserID, String humanUserID, String description, String specialIngredients, String serving, String specialNote, String foodImageId, String locationLat, String locationLong, String createdAt, String deletedAt, String updatedAt, String status) {
|
||||
this.foodId = foodId;
|
||||
this.foodName = foodName;
|
||||
this.dietType = dietType;
|
||||
this.angelUserID = angelUserID;
|
||||
this.humanUserID = humanUserID;
|
||||
this.description = description;
|
||||
this.specialIngredients = specialIngredients;
|
||||
this.serving = serving;
|
||||
this.specialNote = specialNote;
|
||||
this.foodImageId = foodImageId;
|
||||
this.locationLat = locationLat;
|
||||
this.locationLong = locationLong;
|
||||
this.createdAt = createdAt;
|
||||
this.deletedAt = deletedAt;
|
||||
this.updatedAt = updatedAt;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getFoodId() {
|
||||
return foodId;
|
||||
}
|
||||
|
||||
public void setFoodId(String foodId) {
|
||||
this.foodId = foodId;
|
||||
}
|
||||
|
||||
public String getFoodName() {
|
||||
return foodName;
|
||||
}
|
||||
|
||||
public void setFoodName(String foodName) {
|
||||
this.foodName = foodName;
|
||||
}
|
||||
|
||||
public String getDietType() {
|
||||
return dietType;
|
||||
}
|
||||
|
||||
public void setDietType(String dietType) {
|
||||
this.dietType = dietType;
|
||||
}
|
||||
|
||||
public String getAngelUserID() {
|
||||
return angelUserID;
|
||||
}
|
||||
|
||||
public void setAngelUserID(String angelUserID) {
|
||||
this.angelUserID = angelUserID;
|
||||
}
|
||||
|
||||
public String getHumanUserID() {
|
||||
return humanUserID;
|
||||
}
|
||||
|
||||
public void setHumanUserID(String humanUserID) {
|
||||
this.humanUserID = humanUserID;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getSpecialIngredients() {
|
||||
return specialIngredients;
|
||||
}
|
||||
|
||||
public void setSpecialIngredients(String specialIngredients) {
|
||||
this.specialIngredients = specialIngredients;
|
||||
}
|
||||
|
||||
public String getServing() {
|
||||
return serving;
|
||||
}
|
||||
|
||||
public void setServing(String serving) {
|
||||
this.serving = serving;
|
||||
}
|
||||
|
||||
public String getSpecialNote() {
|
||||
return specialNote;
|
||||
}
|
||||
|
||||
public void setSpecialNote(String specialNote) {
|
||||
this.specialNote = specialNote;
|
||||
}
|
||||
|
||||
public String getFoodImageId() {
|
||||
return foodImageId;
|
||||
}
|
||||
|
||||
public void setFoodImageId(String foodImageId) {
|
||||
this.foodImageId = foodImageId;
|
||||
}
|
||||
|
||||
public String getLocationLat() {
|
||||
return locationLat;
|
||||
}
|
||||
|
||||
public void setLocationLat(String locationLat) {
|
||||
this.locationLat = locationLat;
|
||||
}
|
||||
|
||||
public String getLocationLong() {
|
||||
return locationLong;
|
||||
}
|
||||
|
||||
public void setLocationLong(String locationLong) {
|
||||
this.locationLong = locationLong;
|
||||
}
|
||||
|
||||
public String getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getDeletedAt() {
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
public void setDeletedAt(String deletedAt) {
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public String getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(String updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -98,6 +98,11 @@ public class SecondSignupActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
else{
|
||||
progressDialog = new ProgressDialog(SecondSignupActivity.this, R.style.ProgressDialogStyle);
|
||||
progressDialog.setMessage("Please Wait..");
|
||||
progressDialog.setCancelable(true);
|
||||
progressDialog.show();
|
||||
|
||||
Converter pwdRegConvert = new Converter();
|
||||
try {
|
||||
password = pwdRegConvert.SHA1(password);
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.qualis.angelapp.ViewHolder;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.qualis.angelapp.Interface.ItemClickListener;
|
||||
import com.qualis.angelapp.R;
|
||||
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
||||
public class FoodViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
|
||||
public TextView foodName, foodServing;
|
||||
public CircleImageView foodImage;
|
||||
|
||||
private ItemClickListener itemClickListener;
|
||||
|
||||
public void setItemClickListener(ItemClickListener itemClickListener) {
|
||||
this.itemClickListener = itemClickListener;
|
||||
}
|
||||
|
||||
public FoodViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
foodName = (TextView) itemView.findViewById(R.id.food_name);
|
||||
foodServing = (TextView) itemView.findViewById(R.id.food_serving);
|
||||
|
||||
foodImage = (CircleImageView) itemView.findViewById(R.id.food_image);
|
||||
|
||||
itemView.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
itemClickListener.onClick(view,getAdapterPosition(),false);
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#020202"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#020202"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M15,4c-4.42,0 -8,3.58 -8,8s3.58,8 8,8 8,-3.58 8,-8 -3.58,-8 -8,-8zM15,18c-3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6 6,2.69 6,6 -2.69,6 -6,6zM3,12c0,-2.61 1.67,-4.83 4,-5.65L7,4.26C3.55,5.15 1,8.27 1,12s2.55,6.85 6,7.74v-2.09c-2.33,-0.82 -4,-3.04 -4,-5.65z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#020202"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#020202"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M16.01,7L16,3h-2v4h-4V3H8v4h-0.01C7,6.99 6,7.99 6,8.99v5.49L9.5,18v3h5v-3l3.5,-3.51v-5.5c0,-1 -1,-2 -1.99,-1.99z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#020202"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M19.1,12.9a2.8,2.8 0,0 0,0.1 -0.9,2.8 2.8,0 0,0 -0.1,-0.9l2.1,-1.6a0.7,0.7 0,0 0,0.1 -0.6L19.4,5.5a0.7,0.7 0,0 0,-0.6 -0.2l-2.4,1a6.5,6.5 0,0 0,-1.6 -0.9l-0.4,-2.6a0.5,0.5 0,0 0,-0.5 -0.4H10.1a0.5,0.5 0,0 0,-0.5 0.4L9.3,5.4a5.6,5.6 0,0 0,-1.7 0.9l-2.4,-1a0.4,0.4 0,0 0,-0.5 0.2l-2,3.4c-0.1,0.2 0,0.4 0.2,0.6l2,1.6a2.8,2.8 0,0 0,-0.1 0.9,2.8 2.8,0 0,0 0.1,0.9L2.8,14.5a0.7,0.7 0,0 0,-0.1 0.6l1.9,3.4a0.7,0.7 0,0 0,0.6 0.2l2.4,-1a6.5,6.5 0,0 0,1.6 0.9l0.4,2.6a0.5,0.5 0,0 0,0.5 0.4h3.8a0.5,0.5 0,0 0,0.5 -0.4l0.3,-2.6a5.6,5.6 0,0 0,1.7 -0.9l2.4,1a0.4,0.4 0,0 0,0.5 -0.2l2,-3.4c0.1,-0.2 0,-0.4 -0.2,-0.6ZM12,15.6A3.6,3.6 0,1 1,15.6 12,3.6 3.6,0 0,1 12,15.6Z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary"
|
||||
tools:context=".AddFoodActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arrowBack"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_arrow_back_black_24dp"/>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@+id/arrowBack"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerInParent="true"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="30dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="149dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:lines="4"
|
||||
android:maxLines="4"
|
||||
android:text="Create New Food"
|
||||
android:textColor="@android:color/background_light"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="159dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|end"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="Steps"
|
||||
android:textColor="@android:color/background_light"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|end
|
||||
"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="1/2"
|
||||
android:textColor="@android:color/background_light"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="25dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="63dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cameraInvoke"
|
||||
android:layout_width="163dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="10dp"
|
||||
android:text="Food Image"
|
||||
android:textColor="#cffd02"
|
||||
android:textSize="19sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:id="@+id/imgFoodPhoto"
|
||||
android:clickable="true"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/food_place_holder"
|
||||
android:elevation="7dp"
|
||||
android:cropToPadding="true"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtFoodName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:met_floatingLabelText="Food Title"
|
||||
android:hint="Food Title"
|
||||
android:inputType="textCapWords"
|
||||
android:textSize="16sp"
|
||||
app:met_baseColor="#C0C0C0"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelTextColor="@android:color/white"
|
||||
app:met_floatingLabelTextSize="19sp"
|
||||
app:met_iconPadding="5dp"
|
||||
app:met_primaryColor="#cffd02"
|
||||
app:met_textColorHint="#cffd02" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtDietType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:hint="e.g Vegan or NonSpecial"
|
||||
android:inputType="textCapWords"
|
||||
app:met_floatingLabelText="Type of Diet"
|
||||
app:met_baseColor="#C0C0C0"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelTextColor="@android:color/white"
|
||||
app:met_floatingLabelTextSize="19sp"
|
||||
app:met_primaryColor="#cffd02"
|
||||
app:met_textColorHint="#cffd02" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<life.sabujak.roundedbutton.RoundedButton
|
||||
android:id="@+id/btnAddFood1"
|
||||
android:layout_width="195dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"
|
||||
android:text="Continue"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:buttonColor="@color/colorAllButtons"
|
||||
app:buttonCornerRadius="30dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary"
|
||||
tools:context=".SecondSignupActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arrowBack"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="10dp"
|
||||
app:srcCompat="@drawable/ic_arrow_back_black_24dp"/>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@+id/arrowBack"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerInParent="true"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="30dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="149dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:lines="4"
|
||||
android:maxLines="4"
|
||||
android:text="Create New Food"
|
||||
android:textColor="@android:color/background_light"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|end"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="Steps"
|
||||
android:textColor="@android:color/background_light"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|end
|
||||
"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="2/2"
|
||||
android:textColor="@android:color/background_light"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="25dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtFoodDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:hint=" Decription"
|
||||
android:inputType="textLongMessage"
|
||||
app:met_floatingLabelText="Description"
|
||||
app:met_baseColor="#C0C0C0"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelTextColor="@android:color/white"
|
||||
app:met_floatingLabelTextSize="19sp"
|
||||
app:met_primaryColor="#cffd02"
|
||||
app:met_textColorHint="#cffd02" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtSpecialIngredients"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:includeFontPadding="true"
|
||||
android:hint="e.g Mushrooms, Lemongrass"
|
||||
android:inputType="textCapWords"
|
||||
android:textSize="16sp"
|
||||
app:met_floatingLabelText="Special Ingredients"
|
||||
app:met_baseColor="#C0C0C0"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelTextColor="@android:color/white"
|
||||
app:met_floatingLabelTextSize="19sp"
|
||||
app:met_iconPadding="5dp"
|
||||
app:met_primaryColor="#cffd02"
|
||||
app:met_textColorHint="#cffd02" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtFoodServing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:includeFontPadding="true"
|
||||
android:hint="e.g 2"
|
||||
android:inputType="number"
|
||||
android:textSize="16sp"
|
||||
app:met_floatingLabelText="Serving"
|
||||
app:met_baseColor="#C0C0C0"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelTextColor="@android:color/white"
|
||||
app:met_floatingLabelTextSize="19sp"
|
||||
app:met_iconPadding="5dp"
|
||||
app:met_primaryColor="#cffd02"
|
||||
app:met_textColorHint="#cffd02" />
|
||||
|
||||
<com.rengwuxian.materialedittext.MaterialEditText
|
||||
android:id="@+id/edtSpecialNote"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:includeFontPadding="true"
|
||||
android:hint="e.g Not suitable for people with diabetes"
|
||||
android:inputType="textShortMessage"
|
||||
android:textSize="16sp"
|
||||
app:met_floatingLabelText="Special Note"
|
||||
app:met_baseColor="#C0C0C0"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelTextColor="@android:color/white"
|
||||
app:met_floatingLabelTextSize="19sp"
|
||||
app:met_iconPadding="5dp"
|
||||
app:met_primaryColor="#cffd02"
|
||||
app:met_textColorHint="#cffd02" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<life.sabujak.roundedbutton.RoundedButton
|
||||
android:id="@+id/btnAddFood2"
|
||||
android:layout_width="195dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center"
|
||||
android:padding="15dp"
|
||||
android:text="Finish"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:buttonColor="@color/colorAllButtons"
|
||||
app:buttonCornerRadius="30dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:card_view="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="4dp"
|
||||
card_view:cardCornerRadius="9dp"
|
||||
app:cardElevation="10dp"
|
||||
app:cardCornerRadius="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="start"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/food_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="2dp"
|
||||
android:src="@drawable/angel_icon_bmp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="start"
|
||||
android:text="Chicken Tikka"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_serving"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="start"
|
||||
android:text="Serves: "
|
||||
android:textColor="@color/colorMiscellaneous"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_browse"
|
||||
android:id="@+id/nav_add_food"
|
||||
android:icon="@drawable/ic_baseline_add_circle_24"
|
||||
android:title="@string/menu_browse" />
|
||||
<item
|
||||
|
||||
@@ -17,4 +17,10 @@
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="ProgressDialogStyle" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="colorAccent">@color/colorStartButton</item>
|
||||
<item name="android:textColorPrimary">@android:color/white</item>
|
||||
<item name="android:background">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user