In Android, we normally use the R class in order to gain access to the drawable, layout, string (and others) variables.

I made this helper method to get a resource id dynamically. However, if you have no need for this, it is a better option to use the R class directly as the search operation is quicker compared to this.

Let us say, you have an XML file named help.xml in your res/layout/ folder. To use the method, do it like this.

Here is a useful function to remove any element by id using Javascript.

Related Posts Plugin for WordPress, Blogger...