Axel M. Garcia Axel M. Garcia - 1 year ago 106
Android Question

How to set a Fragment tag by code?

I haven't found something like

setTag(String tagName)
method in the
class. The only way to set a
tag that I have found is by doing a
and passing a tag name as parameter.

Is this the only way to explicitly set a
tag by code?

Answer Source

Yes. So the only way is at transaction time, e.g. using add, replace, or as part of the layout.

I determined this through an examination of the compatibility sources as I briefly looked for similar at some point in the past.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download