Android Question [Solved]Comments in xml file

Theera

Well-Known Member
Licensed User
Longtime User
Refer to this, After Aeric can solved my problem. I would like the xmlfile to study how to code(What the different my code and yours), and I have another problem If library is b4xlib, How should we do? (My thinking, we must create xml forB4Xlib before) I would like disturb again, please
 

Attachments

  • TTS.xml
    4.3 KB · Views: 38
Last edited:

teddybear

Well-Known Member
Licensed User
and I have another problem If library is b4xlib, How should we do? (My thinking, we must create xml forB4Xlib before) I would like disturb again, please
You mustn't create xml for B4Xlib . you just need to add comments in your class module of the b4xlib, it looks like this
B4X:
'Comments you would like to write for the method
Public Sub YourMethod
...
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
I wonder that after I copy his xmlfile and replace instead of my xmlfile, but it can't display right.
(I use B4A13 thelastest.)
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I have another problem If library is b4xlib, How should we do? (My thinking, we must create xml forB4Xlib before)
It is better to ask a new question is new post.

For b4xlib, it is NOT a must to create an XML file.
However, if you have an xml file, you can put it inside the XML folder so you can read it by B4X Object Browser.

To add your own comment into b4xlib, you need to extract the bas files. After you added the comment, put the file back into the b4xlib.

eg. OkhttpUtils2

1725182345312.png


1725181936489.png


1725181995018.png


Take note that new update of B4A or B4J will overwrite the internal libraries.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Please try copy my xmlfile instead of yours.It still display correct, or not?
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
My B4A can't do. I think I must do new installation.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
My B4A can't do. I think I must do new installation.
You need not to do a new installation. That's because there is a TTS internal library in B4A, you may rename your TTS.xml to TTS1.xml and refer to the TTS1 library
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Did you do Refresh on the libraries tab after you edited the xml?
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
You need not to do a new installation. it's because there is a TTS internal library in B4A, you may rename your TTS.xml to TTS1.xml
Thank you your answer.I found my problem.
Because I copied tts library in additional libfolder. So then it show the same result.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Thank you all of you. It can be solved
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Haha. I think my hint was not obvious.
At#7 how to code "English" is in the same vertical line with "Thai" I tried to use<p>... </p> , but it can't be right.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Thank you your answer.I found my problem.
Because I copied tts library in additional libfolder. So then it show the same result.
Remember, internal libraries must not copied to additional libraries folder to avoid confusion and the IDE will ignore the additional library.
Before you install new version of B4A and B4J, backup your modified XML and B4Xlibs. You need to update these libraries again. Maybe it is a good idea as pointed out by teddybear that you have to rename the libraries and then you can put them in additional libraries folder.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
I mean that "English" and "ภาษาไทย" (Thai Language) should be in the same vertical line alike your picture. I have tried code in xml but I can't do.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I mean that "English" and "ภาษาไทย" (Thai Language) should be in the same vertical line alike your picture. I have tried code in xml but I can't do.
I don't recommend you to add the word "English" and "ภาษาไทย" because it is obvious. It makes the comment becomes long and developer need to scroll it. (as showed in post #7 above)

For me, this looks better.
1725254043221.png
 

Attachments

  • TTS.xml
    4.2 KB · Views: 28
Upvote 0
Top