Can I get this string in code?
GetId()
returns an int?
EDIT:
If not, is there a way I can assign my textboxes a tag each, which is a string, and then return this in code?
Can I get this string in code?
GetId()
returns an int?
EDIT:
If not, is there a way I can assign my textboxes a tag each, which is a string, and then return this in code?
You are looking for the resource name:
getResources().getResourceEntryName(intresid);
If you want the resource name include package name then use:
getResources().getResourceName(intresid);
Can I get this string in code?
No. You can get only ID
of resource. Reason is because your R.class
storing all resources as
public static final int fields
Your R.java
can looks similar like this:
public static final class id {
public static final int DataHallTextField=0x7f09000a;
}
If not, is there a way I can assign my textboxes a tag each, which is a string, and then return this in code?
So i think you are looking for this:
String name = getResources().getResourceEntryName(R.id.DataHallTextField);
If you want also package you can use
String name = getResources().getResourceName(R.id.DataHallTextField);