Google makes a mess of their documentation: They do not define key terms and when they do, the definitions are ambiguous.
You are not better. I do not want to hurt your feelings, I am telling the truth. If a newbie reads the part on ItemKeyProvider and can understand it, they are a superhuman.
What is a selection key? What is the purpose of getkey or getselectionkey?
Tell your readers this and they will figure out the rest of the code for each function.
Too bad. I stopped reading when I reached this part.
The name of these functions corresponds to their actions:
getSelectionKey, in this example returns the item id that has just been selected. In other words, the last item youโve clicked on the list.
getKey, from ItemsKeyProvider, returns the current id of a cell. From the article: itโs time to implement the ItemKeyProvider . This class holds the IDโs of the different cells you can select.