Package com.xffffff.wellfed.common
Class SearchItemContract<Item extends java.io.Serializable>
- java.lang.Object
-
- androidx.activity.result.contract.ActivityResultContract<android.content.Intent,android.util.Pair<java.lang.String,Item>>
-
- com.xffffff.wellfed.common.SearchItemContract<Item>
-
- Type Parameters:
Item
- the type of item to edit
public class SearchItemContract<Item extends java.io.Serializable> extends androidx.activity.result.contract.ActivityResultContract<android.content.Intent,android.util.Pair<java.lang.String,Item>>
The EditItemContract class is a contract that handles the communication between the EditItemActivity and the EditItemAdapter.
-
-
Constructor Summary
Constructors Constructor Description SearchItemContract()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.content.Intent
createIntent(android.content.Context context, android.content.Intent intent)
createIntent creates the intent for the EditItemActivityandroid.util.Pair<java.lang.String,Item>
parseResult(int i, android.content.Intent intent)
parseResult parses the result from the EditItemActivity
-
-
-
Method Detail
-
createIntent
public android.content.Intent createIntent(@NonNull android.content.Context context, android.content.Intent intent)
createIntent creates the intent for the EditItemActivity- Specified by:
createIntent
in classandroidx.activity.result.contract.ActivityResultContract<android.content.Intent,android.util.Pair<java.lang.String,Item extends java.io.Serializable>>
- Parameters:
context
- the context of the activityintent
- the intent to edit- Returns:
- the intent
-
parseResult
public android.util.Pair<java.lang.String,Item> parseResult(int i, @Nullable android.content.Intent intent)
parseResult parses the result from the EditItemActivity- Specified by:
parseResult
in classandroidx.activity.result.contract.ActivityResultContract<android.content.Intent,android.util.Pair<java.lang.String,Item extends java.io.Serializable>>
- Parameters:
i
- the result codeintent
- the intent- Returns:
- the result
-
-