[wish&bug?]support resource access

icefairy333

Active Member
Licensed User
Longtime User
[wish]support resource access
like B4AR.getid("layout","main")
I had test
B4X:
BA.applicationContext.getResources().getIdentifier(resourceName, type, BA.packageName)
but it is so troublesome,and I have some res file ,in eclipse complied ok,but in b4a complied with error
B4X:
Compiling code.                         0.01
Compiling layouts code.                 0.00
Generating R file.                      0.81
Compiling generated Java code.          0.76
Convert byte code - optimized dex.      2.12
   Standard dexer.
Packaging files.                        0.87
Copying libraries resources             0.57
   Found 21 resource files.
Signing package file (private key)      Error

jarsigner: 无法对 jar 进行签名: java.util.zip.ZipException: duplicate entry: res/drawable/mediacontroller_pause_button.xml
It looks like b4a complied R.java in an error mode or method ?
here is the res:
 

Attachments

  • res.zip
    27 KB · Views: 259

Roger Garstang

Well-Known Member
Licensed User
Longtime User
I'm all for not clearing the res folder unless told...the readonly stuff does get annoying and often lost when put to zip file. If you want a function to GetID I added one in my Line Layout Library that works pretty good. I had to add it because it was the only one that reliably allowed me to put 9 Patch or regular backgrounds on my Views in it.
 

icefairy333

Active Member
Licensed User
Longtime User

I saw it,but didn't test with it,I was wrapping vitiamio video library with the newest version(3.0) it has some resource in it,so ……,currently I had complete wrap the function of play a video (it's no need to download any plugin from network )
 

moster67

Expert
Licensed User
Longtime User
Great!

Will you be sharing it?


 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…