How to get the id of a string resource associated with a TextView?

前端 未结 2 1497
醉话见心
醉话见心 2021-01-24 06:56

I can access the TextView instance, get it\'s resource ID and get it\'s resource name via getResources().getResourceEntryName(), but I can\'t seem to find a way to

2条回答
  •  天涯浪人
    2021-01-24 07:58

    You can't. A TextView doesn't store the id of the String resources if you call setText(int resid). All this overloaded method does is get the String from the resources and call the setText(CharSequence text) method.

提交回复
热议问题