Package com.xffffff.wellfed.ingredient
Class IngredientEditContract
- java.lang.Object
-
- androidx.activity.result.contract.ActivityResultContract<StorageIngredient,android.util.Pair<java.lang.String,StorageIngredient>>
-
- com.xffffff.wellfed.ingredient.IngredientEditContract
-
public class IngredientEditContract extends androidx.activity.result.contract.ActivityResultContract<StorageIngredient,android.util.Pair<java.lang.String,StorageIngredient>>
A contract for creating intents to edit an Ingredient, and results of these intents.
-
-
Constructor Summary
Constructors Constructor Description IngredientEditContract()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.content.Intent
createIntent(android.content.Context context, StorageIngredient storageIngredient)
Creates an Intent for the IngredientEditActivity.android.util.Pair<java.lang.String,StorageIngredient>
parseResult(int i, android.content.Intent intent)
Pair object for the result of the IngredientEditActivity.
-
-
-
Method Detail
-
createIntent
@NonNull public android.content.Intent createIntent(@NonNull android.content.Context context, StorageIngredient storageIngredient)
Creates an Intent for the IngredientEditActivity.- Specified by:
createIntent
in classandroidx.activity.result.contract.ActivityResultContract<StorageIngredient,android.util.Pair<java.lang.String,StorageIngredient>>
- Parameters:
context
- Context object for the activity.storageIngredient
- StorageIngredient object for the ingredient.- Returns:
- Intent object for the IngredientEditActivity.
-
parseResult
public android.util.Pair<java.lang.String,StorageIngredient> parseResult(int i, android.content.Intent intent)
Pair object for the result of the IngredientEditActivity.- Specified by:
parseResult
in classandroidx.activity.result.contract.ActivityResultContract<StorageIngredient,android.util.Pair<java.lang.String,StorageIngredient>>
- Parameters:
i
- index of the ingredient.intent
- Intent object for the IngredientEditActivity.- Returns:
- Pair object for the result of the IngredientEditActivity.
-
-