Compare commits
2 Commits
c423a9e19d
...
1c085a4262
Author | SHA1 | Date | |
---|---|---|---|
1c085a4262 | |||
4772c0ef26 |
@ -45,7 +45,7 @@
|
|||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.dishes.CreateDishAIActivity"
|
android:name=".ui.dishes.GenerateRecipeActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
@ -3,11 +3,6 @@ package tech.mercantec.easyeat.helpers
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import tech.mercantec.easyeat.models.CreateDirection
|
|
||||||
import tech.mercantec.easyeat.models.CreateIngredient
|
|
||||||
import tech.mercantec.easyeat.models.CreateRecipe
|
|
||||||
import tech.mercantec.easyeat.models.Direction
|
|
||||||
import tech.mercantec.easyeat.models.Ingredient
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class LoginRequest(val emailUsr: String, val password: String)
|
data class LoginRequest(val emailUsr: String, val password: String)
|
||||||
@ -114,26 +109,3 @@ fun changePassword(ctx: Context, oldPassword: String, newPassword: String) {
|
|||||||
|
|
||||||
return requestJson<ChangePasswordRequest, Unit>(ctx, "PUT", "/api/User/change-password", request)
|
return requestJson<ChangePasswordRequest, Unit>(ctx, "PUT", "/api/User/change-password", request)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class CreateRecipeRequest(val name: String, val description: String, val directions: List<CreateDirection>, val ingredients: List<CreateIngredient>)
|
|
||||||
|
|
||||||
fun createRecipe(ctx: Context, recipe: CreateRecipe) {
|
|
||||||
val request = CreateRecipeRequest(recipe.name, recipe.description, recipe.directions, recipe.ingredients)
|
|
||||||
|
|
||||||
requestJson<CreateRecipeRequest, Boolean>(ctx, "POST", "/api/recipe/create", request)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class GetAllRecipesResponse(val id: Int, val name: String, val description: String)
|
|
||||||
|
|
||||||
fun getAllRecipies(ctx: Context): List<GetAllRecipesResponse> {
|
|
||||||
return requestJson<Unit, List<GetAllRecipesResponse>>(ctx, "GET", "/api/Recipe/getall", null)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class RecipeDetailsResponse(val id: Int, val name: String, val description: String, val directions: List<Direction>, val ingredients: List<Ingredient>)
|
|
||||||
|
|
||||||
fun getRecipeDetails(ctx: Context, id: Int): RecipeDetailsResponse {
|
|
||||||
return requestJson<Unit, RecipeDetailsResponse>(ctx, "GET", "/api/Recipe/get/$id", null)
|
|
||||||
}
|
|
||||||
|
@ -2,6 +2,7 @@ package tech.mercantec.easyeat.helpers
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
import tech.mercantec.easyeat.models.Ingredient
|
||||||
import tech.mercantec.easyeat.models.Recipe
|
import tech.mercantec.easyeat.models.Recipe
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -10,3 +11,21 @@ data class GenerateRecipeRequest(val dish: String, val language: String, val num
|
|||||||
fun generateRecipeWithAI(ctx: Context, title: String, language: String): Recipe {
|
fun generateRecipeWithAI(ctx: Context, title: String, language: String): Recipe {
|
||||||
return requestJson<GenerateRecipeRequest, Recipe>(ctx, "POST", "/api/Recipe/chatbot", GenerateRecipeRequest(title, language, 1, arrayOf()))
|
return requestJson<GenerateRecipeRequest, Recipe>(ctx, "POST", "/api/Recipe/chatbot", GenerateRecipeRequest(title, language, 1, arrayOf()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun createRecipe(ctx: Context, recipe: Recipe) {
|
||||||
|
requestJson<Recipe, Boolean>(ctx, "POST", "/api/recipe/create", recipe)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class GetAllRecipesResponse(val id: Int, val name: String, val description: String)
|
||||||
|
|
||||||
|
fun getAllRecipes(ctx: Context): List<GetAllRecipesResponse> {
|
||||||
|
return requestJson<Unit, List<GetAllRecipesResponse>>(ctx, "GET", "/api/Recipe/getall", null)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class RecipeDetailsResponse(val id: Int, val name: String, val description: String, val directions: List<String>, val ingredients: List<Ingredient>)
|
||||||
|
|
||||||
|
fun getRecipeDetails(ctx: Context, id: Int): RecipeDetailsResponse {
|
||||||
|
return requestJson<Unit, RecipeDetailsResponse>(ctx, "GET", "/api/Recipe/get/$id", null)
|
||||||
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
package tech.mercantec.easyeat.models
|
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class CreateRecipe(
|
|
||||||
val name: String,
|
|
||||||
val description: String,
|
|
||||||
val directions: List<CreateDirection>,
|
|
||||||
val ingredients: List<CreateIngredient>
|
|
||||||
)
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class CreateDirection(
|
|
||||||
val instructions: String
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class CreateIngredient(
|
|
||||||
val amount: Double?,
|
|
||||||
val unit: String?,
|
|
||||||
val name: String
|
|
||||||
)
|
|
@ -2,10 +2,9 @@ package tech.mercantec.easyeat.models
|
|||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Recipe(
|
data class Recipe(
|
||||||
val id: Int,
|
val id: Int? = null,
|
||||||
val name: String,
|
val name: String,
|
||||||
val description: String,
|
val description: String,
|
||||||
val directions: List<String>,
|
val directions: List<String>,
|
||||||
@ -14,7 +13,7 @@ data class Recipe(
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Ingredient(
|
data class Ingredient(
|
||||||
val id: Int,
|
val id: Int? = null,
|
||||||
val amount: Double?,
|
val amount: Double?,
|
||||||
val unit: String?,
|
val unit: String?,
|
||||||
val name: String
|
val name: String
|
||||||
|
@ -2,9 +2,7 @@ package tech.mercantec.easyeat.ui.dishes
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.ProgressDialog
|
import android.app.ProgressDialog
|
||||||
import android.content.Context
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -14,15 +12,11 @@ import android.widget.LinearLayout
|
|||||||
import android.widget.Spinner
|
import android.widget.Spinner
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContentProviderCompat.requireContext
|
|
||||||
import tech.mercantec.easyeat.R
|
import tech.mercantec.easyeat.R
|
||||||
import tech.mercantec.easyeat.helpers.ApiRequestException
|
import tech.mercantec.easyeat.helpers.ApiRequestException
|
||||||
import tech.mercantec.easyeat.helpers.changePassword
|
|
||||||
import tech.mercantec.easyeat.helpers.createRecipe
|
import tech.mercantec.easyeat.helpers.createRecipe
|
||||||
import tech.mercantec.easyeat.helpers.request
|
import tech.mercantec.easyeat.models.Ingredient
|
||||||
import tech.mercantec.easyeat.models.CreateDirection
|
import tech.mercantec.easyeat.models.Recipe
|
||||||
import tech.mercantec.easyeat.models.CreateIngredient
|
|
||||||
import tech.mercantec.easyeat.models.CreateRecipe
|
|
||||||
import kotlin.concurrent.thread
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
class CreateDishActivity : AppCompatActivity() {
|
class CreateDishActivity : AppCompatActivity() {
|
||||||
@ -53,7 +47,7 @@ class CreateDishActivity : AppCompatActivity() {
|
|||||||
.map { line -> line.trim() }
|
.map { line -> line.trim() }
|
||||||
.filter { it.isNotEmpty() }
|
.filter { it.isNotEmpty() }
|
||||||
|
|
||||||
val recipe = CreateRecipe(
|
val recipe = Recipe(
|
||||||
name = findViewById<EditText>(R.id.dishName).text.toString().trim(),
|
name = findViewById<EditText>(R.id.dishName).text.toString().trim(),
|
||||||
description = findViewById<EditText>(R.id.dishDescription).text.toString().trim(),
|
description = findViewById<EditText>(R.id.dishDescription).text.toString().trim(),
|
||||||
directions = directions,
|
directions = directions,
|
||||||
@ -107,8 +101,8 @@ class CreateDishActivity : AppCompatActivity() {
|
|||||||
ingredientContainer.addView(ingredientRow)
|
ingredientContainer.addView(ingredientRow)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun collectIngredients(): List<CreateIngredient> {
|
private fun collectIngredients(): List<Ingredient> {
|
||||||
val ingredients = mutableListOf<CreateIngredient>()
|
val ingredients = mutableListOf<Ingredient>()
|
||||||
|
|
||||||
for (i in 0 until ingredientContainer.childCount) {
|
for (i in 0 until ingredientContainer.childCount) {
|
||||||
val ingredientView = ingredientContainer.getChildAt(i)
|
val ingredientView = ingredientContainer.getChildAt(i)
|
||||||
@ -125,7 +119,7 @@ class CreateDishActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
// Optional: Only add non-empty rows
|
// Optional: Only add non-empty rows
|
||||||
if (element.isNotEmpty() && amount.isNotEmpty()) {
|
if (element.isNotEmpty() && amount.isNotEmpty()) {
|
||||||
ingredients.add(CreateIngredient(name = element, amount = amount.toDouble(), unit = unit))
|
ingredients.add(Ingredient(name = element, amount = amount.toDouble(), unit = unit))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import tech.mercantec.easyeat.R
|
|||||||
import tech.mercantec.easyeat.databinding.FragmentDishesBinding
|
import tech.mercantec.easyeat.databinding.FragmentDishesBinding
|
||||||
import tech.mercantec.easyeat.helpers.ApiRequestException
|
import tech.mercantec.easyeat.helpers.ApiRequestException
|
||||||
import tech.mercantec.easyeat.helpers.GetAllRecipesResponse
|
import tech.mercantec.easyeat.helpers.GetAllRecipesResponse
|
||||||
import tech.mercantec.easyeat.helpers.getAllRecipies
|
import tech.mercantec.easyeat.helpers.getAllRecipes
|
||||||
import tech.mercantec.easyeat.models.DishListItem
|
import tech.mercantec.easyeat.models.DishListItem
|
||||||
import kotlin.concurrent.thread
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ class DishesFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialogView.findViewById<Button>(R.id.createAIBtn).setOnClickListener {
|
dialogView.findViewById<Button>(R.id.createAIBtn).setOnClickListener {
|
||||||
val intent = Intent(requireContext(), CreateDishAIActivity::class.java)
|
val intent = Intent(requireContext(), GenerateRecipeActivity::class.java)
|
||||||
createDishLauncher.launch(intent)
|
createDishLauncher.launch(intent)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ class DishesFragment : Fragment() {
|
|||||||
thread {
|
thread {
|
||||||
val recipes: List<GetAllRecipesResponse>
|
val recipes: List<GetAllRecipesResponse>
|
||||||
try {
|
try {
|
||||||
recipes = getAllRecipies(requireContext())
|
recipes = getAllRecipes(requireContext())
|
||||||
} catch (e: ApiRequestException) {
|
} catch (e: ApiRequestException) {
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
Toast.makeText(requireContext(), e.message, Toast.LENGTH_LONG).show()
|
Toast.makeText(requireContext(), e.message, Toast.LENGTH_LONG).show()
|
||||||
|
@ -4,20 +4,19 @@ import android.app.ProgressDialog
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
import android.widget.LinearLayout
|
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import tech.mercantec.easyeat.R
|
import tech.mercantec.easyeat.R
|
||||||
import tech.mercantec.easyeat.helpers.ApiRequestException
|
import tech.mercantec.easyeat.helpers.ApiRequestException
|
||||||
import tech.mercantec.easyeat.helpers.GenerateRecipeResponse
|
import tech.mercantec.easyeat.helpers.createRecipe
|
||||||
import tech.mercantec.easyeat.helpers.generateRecipeWithAI
|
import tech.mercantec.easyeat.helpers.generateRecipeWithAI
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import kotlin.concurrent.thread
|
import kotlin.concurrent.thread
|
||||||
|
|
||||||
class CreateDishAIActivity : AppCompatActivity() {
|
class GenerateRecipeActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.create_dish_ai_form)
|
setContentView(R.layout.activity_generate_recipe)
|
||||||
|
|
||||||
findViewById<Button>(R.id.generate).setOnClickListener {
|
findViewById<Button>(R.id.generate).setOnClickListener {
|
||||||
val name = findViewById<EditText>(R.id.dish_title).text.toString()
|
val name = findViewById<EditText>(R.id.dish_title).text.toString()
|
||||||
@ -27,21 +26,24 @@ class CreateDishAIActivity : AppCompatActivity() {
|
|||||||
progressDialog.show()
|
progressDialog.show()
|
||||||
|
|
||||||
thread {
|
thread {
|
||||||
val response: GenerateRecipeResponse
|
|
||||||
try {
|
try {
|
||||||
response = generateRecipeWithAI(this, name, Locale.getDefault().displayLanguage)
|
val recipe = generateRecipeWithAI(this, name, Locale.getDefault().displayLanguage)
|
||||||
|
|
||||||
|
runOnUiThread {
|
||||||
|
progressDialog.setMessage("Saving...")
|
||||||
|
}
|
||||||
|
|
||||||
|
createRecipe(this, recipe)
|
||||||
|
|
||||||
|
finish()
|
||||||
} catch (e: ApiRequestException) {
|
} catch (e: ApiRequestException) {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
|
Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
return@thread
|
|
||||||
} finally {
|
} finally {
|
||||||
|
runOnUiThread {
|
||||||
progressDialog.hide()
|
progressDialog.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
runOnUiThread {
|
|
||||||
Toast.makeText(this, response.toString(), Toast.LENGTH_LONG).show()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,19 +7,18 @@ import android.view.ViewGroup
|
|||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import tech.mercantec.easyeat.R
|
import tech.mercantec.easyeat.R
|
||||||
import tech.mercantec.easyeat.models.Direction
|
|
||||||
|
|
||||||
class InstructionsAdapter (context: Context, instructions: List<Direction>)
|
class InstructionsAdapter (context: Context, instructions: List<String>)
|
||||||
: ArrayAdapter<Direction>(context, 0, instructions) {
|
: ArrayAdapter<String>(context, R.layout.activity_dish_details_instructions_list_item, instructions) {
|
||||||
|
|
||||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||||
val ingredient = getItem(position)
|
val instruction = getItem(position)
|
||||||
val view = convertView ?: LayoutInflater.from(context)
|
val view = convertView ?: LayoutInflater.from(context)
|
||||||
.inflate(R.layout.activity_dish_details_instructions_list_item, parent, false)
|
.inflate(R.layout.activity_dish_details_instructions_list_item, parent, false)
|
||||||
|
|
||||||
val nameView = view.findViewById<TextView>(R.id.instructionText)
|
val nameView = view.findViewById<TextView>(R.id.instructionText)
|
||||||
|
|
||||||
nameView.text = ingredient?.instruktions ?: ""
|
nameView.text = instruction
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
package tech.mercantec.easyeat.ui.dishes
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.Html
|
||||||
|
import android.text.Html.FROM_HTML_MODE_LEGACY
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.TextView
|
||||||
|
import kotlinx.serialization.json.Json
|
||||||
|
import tech.mercantec.easyeat.R
|
||||||
|
import tech.mercantec.easyeat.models.Recipe
|
||||||
|
|
||||||
|
class RecipeFragment : Fragment() {
|
||||||
|
private var recipe: Recipe? = null
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
arguments?.let { args ->
|
||||||
|
recipe = args.getString("RECIPE")?.let { Json.decodeFromString<Recipe>(it) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?,
|
||||||
|
): View? {
|
||||||
|
val binding = inflater.inflate(R.layout.fragment_recipe, container, false)
|
||||||
|
|
||||||
|
recipe?.let { recipe ->
|
||||||
|
binding.findViewById<TextView>(R.id.title).text = recipe.name
|
||||||
|
|
||||||
|
binding.findViewById<TextView>(R.id.ingredients).text =
|
||||||
|
Html.fromHtml(
|
||||||
|
"<ul>" +
|
||||||
|
recipe.ingredients.map { "<li>${it.amount} ${it.unit} ${it.name}</li>" } +
|
||||||
|
"</ul>",
|
||||||
|
FROM_HTML_MODE_LEGACY
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.findViewById<TextView>(R.id.directions).text =
|
||||||
|
Html.fromHtml(
|
||||||
|
"<ul>" +
|
||||||
|
recipe.directions.map { "<li>${it}</li>" } +
|
||||||
|
"</ul>",
|
||||||
|
FROM_HTML_MODE_LEGACY
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return binding
|
||||||
|
}
|
||||||
|
}
|
48
app/app/src/main/res/layout/fragment_recipe.xml
Normal file
48
app/app/src/main/res/layout/fragment_recipe.xml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="30dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textSize="24sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/ingredients_label"
|
||||||
|
style="@style/HighContrastText"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/ingredients"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/directions_label"
|
||||||
|
style="@style/HighContrastText"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/directions"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
6
app/app/src/main/res/values-night/styles.xml
Normal file
6
app/app/src/main/res/values-night/styles.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="HighContrastText" parent="TextAppearance.AppCompat">
|
||||||
|
<item name="android:textColor">@color/white</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
@ -47,6 +47,8 @@
|
|||||||
<string name="ai_generate_recipe_title">Generate recipe with AI</string>
|
<string name="ai_generate_recipe_title">Generate recipe with AI</string>
|
||||||
<string name="dish_title_label">Name of dish</string>
|
<string name="dish_title_label">Name of dish</string>
|
||||||
<string name="generate_recipe_label">Generate</string>
|
<string name="generate_recipe_label">Generate</string>
|
||||||
|
<string name="ingredients_label">Ingredients</string>
|
||||||
|
<string name="directions_label">Directions</string>
|
||||||
<string-array name="units">
|
<string-array name="units">
|
||||||
<item></item>
|
<item></item>
|
||||||
<item>g</item>
|
<item>g</item>
|
||||||
|
6
app/app/src/main/res/values/styles.xml
Normal file
6
app/app/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="HighContrastText" parent="TextAppearance.AppCompat">
|
||||||
|
<item name="android:textColor">@color/black</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
Loading…
Reference in New Issue
Block a user