在我的布局我已经定义了这样的事情。
In my layout i have defined something like this .
<RadioButton
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dnt want this text" />
假设在活动的一些函数返回我这个ID(单选按钮的ID)。现在,我想这个文本的收音机1 此ID。 总之我想要检索的文本收音机1 写在机器人:ID =@ + ID /收音机1
有谁能告诉我,怎么可能?
Can somebody tell me how is it possible ?
在你的活动,请尝试以下
In your Activity, try the following
getResources()getResourceEntryName(INT渣油);
getResources().getResourceEntryName(int resid);
或
getResources()getResourceName(INT渣油);
getResources().getResourceName(int resid);
您将preFER第一个我想。
You'll prefer the first one I guess.