android - Get only items with a pattern from sharedpreference -
i have values in sharedpreference in app. have items like
itemh1 item1 itemh2 item2 itemh3 item3
how can items itemhx
?
if stored in single preferences file, pretty much limited using sharedpreferences.getall()
, iterating through map entries find keys matching pattern.
the other alternative create different preferences file (using context.getsharedpreferences(filename, context.mode_private)
special items (in example, ones h). way can read keys in file , not have check pattern.
android
No comments:
Post a Comment