Sep 3, 2019 Replies: 7 I want to share my first b4a lib.This is from github:https://github.com/GrenderG/Toasty and i have made some changes. how to use: 1. copy all the addRes folders to your project folder,and add #AdditionalRes:addRes-path in your project,like this:#AdditionalRes:..\addRes 2. copy the lib files to B4A Libraries. 3. there are five types toasty:success,error,info,warning,normal. 4. there is libtoastyconfig class,you can change some parameters,and then apply. Have fun. Attachments libtoasty.zip libtoasty.zip 6.8 KB · Views: 524 toastyExample.zip toastyExample.zip 32.1 KB · Views: 494 Last edited: Sep 4, 2019 Click to expand...
I want to share my first b4a lib.This is from github:https://github.com/GrenderG/Toasty and i have made some changes. how to use: 1. copy all the addRes folders to your project folder,and add #AdditionalRes:addRes-path in your project,like this:#AdditionalRes:..\addRes 2. copy the lib files to B4A Libraries. 3. there are five types toasty:success,error,info,warning,normal. 4. there is libtoastyconfig class,you can change some parameters,and then apply. Have fun.
DonManfred Expert Licensed User Longtime User Sep 3, 2019 #2 carycai said: 1. copy all the res\drawable folders,layout and values to your project res folder,and set all to READONLY. Click to expand... the correct way is to create a new Folder in the projectdir with the same folderstructure add Code: Copy #additionalres: ..\yourresfoldername to your project to add a reference to this resourcefolder. Note that files in this Folders do not need to be READONLY
carycai said: 1. copy all the res\drawable folders,layout and values to your project res folder,and set all to READONLY. Click to expand... the correct way is to create a new Folder in the projectdir with the same folderstructure add Code: Copy #additionalres: ..\yourresfoldername to your project to add a reference to this resourcefolder. Note that files in this Folders do not need to be READONLY
R rkxo Active Member Licensed User Longtime User Sep 3, 2019 #3 hi, i get error android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:225) at android.content.res.Resources.getDrawableForDensity(Resources.java:887) at android.content.res.Resources.getDrawable(Resources.java:827) at android.content.Context.getDrawable(Context.java:626) at com.cary.ToastyUtils.getDrawable(ToastyUtils.java:56) at com.cary.Toasty.info(Toasty.java:106) at com.cary.Toasty.info(Toasty.java:101) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180) at anywheresoftware.b4a.BA.raiseEvent(BA.java:176) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Click to expand... thanks
hi, i get error android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:225) at android.content.res.Resources.getDrawableForDensity(Resources.java:887) at android.content.res.Resources.getDrawable(Resources.java:827) at android.content.Context.getDrawable(Context.java:626) at com.cary.ToastyUtils.getDrawable(ToastyUtils.java:56) at com.cary.Toasty.info(Toasty.java:106) at com.cary.Toasty.info(Toasty.java:101) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180) at anywheresoftware.b4a.BA.raiseEvent(BA.java:176) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Click to expand... thanks
C carycai Member Licensed User Longtime User Sep 4, 2019 #4 DonManfred said: the correct way is to create a new Folder in the projectdir with the same folderstructure add Code: Copy #additionalres: ..\yourresfoldername to your project to add a reference to this resourcefolder. Note that files in this Folders do not need to be READONLY Click to expand... got.I have changed the example.Thank you.
DonManfred said: the correct way is to create a new Folder in the projectdir with the same folderstructure add Code: Copy #additionalres: ..\yourresfoldername to your project to add a reference to this resourcefolder. Note that files in this Folders do not need to be READONLY Click to expand... got.I have changed the example.Thank you.
C carycai Member Licensed User Longtime User Sep 4, 2019 #5 rkxo said: hi, i get error thanks Click to expand... I modified the example,you can download and try again.Please set the res path with this command: 1. copy all the addRes folders to your project folder,and add #AdditionalRes:addRes-path in your project,like this:#AdditionalRes:..\addRes
rkxo said: hi, i get error thanks Click to expand... I modified the example,you can download and try again.Please set the res path with this command: 1. copy all the addRes folders to your project folder,and add #AdditionalRes:addRes-path in your project,like this:#AdditionalRes:..\addRes
DonManfred Expert Licensed User Longtime User Sep 4, 2019 #6 carycai said: 1. copy all the addRes folders to your project folder,and add #AdditionalRes:addRes-path in your project,like this:#AdditionalRes:..\addRes Click to expand... Note that "Projects exported with FILE Export as ZIP" does not contains any additionalres folders! You need to provide these res-folder(s) in an additional ZIP or manually add them to the project-export zip before uploading. None of the uploaded ZIPs from you contains any res-folder
carycai said: 1. copy all the addRes folders to your project folder,and add #AdditionalRes:addRes-path in your project,like this:#AdditionalRes:..\addRes Click to expand... Note that "Projects exported with FILE Export as ZIP" does not contains any additionalres folders! You need to provide these res-folder(s) in an additional ZIP or manually add them to the project-export zip before uploading. None of the uploaded ZIPs from you contains any res-folder
C carycai Member Licensed User Longtime User Sep 5, 2019 #7 DonManfred said: Note that "Projects exported with FILE Export as ZIP" does not contains any additionalres folders! You need to provide these res-folder(s) in an additional ZIP or manually add them to the project-export zip before uploading. None of the uploaded ZIPs from you contains any res-folder Click to expand... I uploaded again.
DonManfred said: Note that "Projects exported with FILE Export as ZIP" does not contains any additionalres folders! You need to provide these res-folder(s) in an additional ZIP or manually add them to the project-export zip before uploading. None of the uploaded ZIPs from you contains any res-folder Click to expand... I uploaded again.
R rkxo Active Member Licensed User Longtime User Sep 5, 2019 #8 thank you very much ,now it works fine