2

I'm new to Android development, so sorry if this question can be answered easily, but I would like to ask what the following tag means:

<com.example.android.ViewName />

I'm trying to develop a game and I've seen some sample XML codes that are similar to that, what does it do?

Any help would be greatly appreciated. I would like to learn from you. Thanks!

2 Answers 2

0

if you design your own layout or widget using java class then you can refer to that in xml by giving tag like above here this tag means some custom designed layout or view by app developer which is then used in xml

for example if my project has package name like com.myname.mypackagetitle and i crate a class CustomizedGadget in my package which extends some widget or some layout like LinearLayout (layout) or EditText (widget) and i add some custom functionality to that layout/widget then to use that widget in xml i will write a tag like

<com.myname.mypackgetitle.CustomizedGadget />
1
  • if it really helped then at least accept the answer by clicking on tick below the vote pole.....:) Oct 28, 2011 at 13:50
0

It means that the View subclass is defined in the application rather than in the Android framework, please refer to http://developer.android.com/guide/topics/ui/custom-components.html for some background information.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.