I have this situation.
This Sub gets an edittext as a parameter, and I need to know after an activity resume, which edittext was used
B4X:
Sub SaveSettings(lText As EditText)
StateManager.SetSetting("bigtext",lText.Text)
End Sub
After an activity resume, I need to restore the original edittext, and I don't know which is.
If only I could save the name of the edittext or some reference.
You have two options:
1. Use a custom type that holds all the things you need and set it as the Tag value.
2. Create a Map with the EditTexts as keys:
B4X:
Dim EditTextNames As Map = CreateMap(EditText1: "EditText1", EditText2: "EditText2")
Dim name As String = EditTextNames.Get(et) 'et is an unknown EditText