0

I have a textview whose id is asd1 If I save asd1 in a string how can I use that string to R.id.(id from string) Meaning how can I use the string to get resource id in a fragment

zAmAr
  • 29
  • 5
  • 1
    The second snippet in [this answer on the linked duplicate](https://stackoverflow.com/a/3476470) has exactly what you're looking for. You would need to call `getPackageName()` on `getActivity()`/`getContext()` instead, though. – Mike M. Jun 04 '18 at 01:03
  • Be warned that there is most likely a better solution to your original problem than what you are trying to do here. – Code-Apprentice Jun 04 '18 at 01:04

0 Answers0