S Smee Well-Known Member Licensed User Longtime User Jun 7, 2017 #1 Hi, If i have png files in this folder rather than the files folder how can i address them when using as a bitmap? I have tried various metods but none seem to work Code: If File.Exists("",image.png) Then bmpName = LoadBitmapSample("", "image.png", 200dip, 200dip) If File.Exists("../res/drawable/",image.png) Then bmpName = LoadBitmapSample("../res/drawable/", "image.png", 200dip, 200dip) Where can i find the correct syntax for addressing various methods of using files in this directory Many Thanks
Hi, If i have png files in this folder rather than the files folder how can i address them when using as a bitmap? I have tried various metods but none seem to work Code: If File.Exists("",image.png) Then bmpName = LoadBitmapSample("", "image.png", 200dip, 200dip) If File.Exists("../res/drawable/",image.png) Then bmpName = LoadBitmapSample("../res/drawable/", "image.png", 200dip, 200dip) Where can i find the correct syntax for addressing various methods of using files in this directory Many Thanks
R ronell Well-Known Member Licensed User Longtime User Jun 8, 2017 #2 https://www.b4x.com/android/forum/threads/place-a-file-into-res-drawable-folder.60085/ edit: why your image files are in res\drawable? Last edited: Jun 8, 2017 Upvote 0
https://www.b4x.com/android/forum/threads/place-a-file-into-res-drawable-folder.60085/ edit: why your image files are in res\drawable?
S Smee Well-Known Member Licensed User Longtime User Jun 8, 2017 #3 ronell said: https://www.b4x.com/android/forum/threads/place-a-file-into-res-drawable-folder.60085/ edit: why your image files are in res\drawable? Click to expand... Thanks for the reply, I have read that thread and found a partial solution here https://www.b4x.com/android/forum/threads/androidresources.16847/ However i understood that to keep memory resources down i need to use loadBitmapSample so that is what I am trying to do I am putting the images into that folder because there are so many of them and i thought it would be a "tidier" solution. Not correct? Thanks again for the reply EDIT: When i say "tidier" solution I do not ant to see 40 or 50 image files in the "files" tab of the IDE and To include them in the project I have to do that no? Edit2 I realise I can drop them straight into the files folder without having to include them in the files tab but i get loads of warnings in the log, just looks messy Last edited: Jun 8, 2017 Upvote 0
ronell said: https://www.b4x.com/android/forum/threads/place-a-file-into-res-drawable-folder.60085/ edit: why your image files are in res\drawable? Click to expand... Thanks for the reply, I have read that thread and found a partial solution here https://www.b4x.com/android/forum/threads/androidresources.16847/ However i understood that to keep memory resources down i need to use loadBitmapSample so that is what I am trying to do I am putting the images into that folder because there are so many of them and i thought it would be a "tidier" solution. Not correct? Thanks again for the reply EDIT: When i say "tidier" solution I do not ant to see 40 or 50 image files in the "files" tab of the IDE and To include them in the project I have to do that no? Edit2 I realise I can drop them straight into the files folder without having to include them in the files tab but i get loads of warnings in the log, just looks messy
R ronell Well-Known Member Licensed User Longtime User Jun 8, 2017 #4 you can try to recycle the bitmap after you use it somewhere else? Upvote 0
S Smee Well-Known Member Licensed User Longtime User Jun 8, 2017 #5 ronell said: you can try to recycle the bitmap after you use it somewhere else? Click to expand... not sure i know how to do that efficiently Upvote 0
ronell said: you can try to recycle the bitmap after you use it somewhere else? Click to expand... not sure i know how to do that efficiently
R ronell Well-Known Member Licensed User Longtime User Jun 8, 2017 #6 Smee said: Edit2 I realise I can drop them straight into the files folder without having to include them in the files tab but i get loads of warnings in the log, just looks messy Click to expand... in your pov .. but not in the users Smee said: not sure i know how to do that efficiently Click to expand... https://www.b4x.com/android/forum/pages/results/?query=recycle Upvote 0
Smee said: Edit2 I realise I can drop them straight into the files folder without having to include them in the files tab but i get loads of warnings in the log, just looks messy Click to expand... in your pov .. but not in the users Smee said: not sure i know how to do that efficiently Click to expand... https://www.b4x.com/android/forum/pages/results/?query=recycle
R ronell Well-Known Member Licensed User Longtime User Jun 8, 2017 #7 Code: #IgnoreWarnings: 14 you can also ignore the warning Upvote 0
S Smee Well-Known Member Licensed User Longtime User Jun 8, 2017 #8 ronell said: Code: #IgnoreWarnings: 14 you can also ignore the warning Click to expand... Thank you, I did not know that. is the number after the ignore the type of warning to ignore? Upvote 0
ronell said: Code: #IgnoreWarnings: 14 you can also ignore the warning Click to expand... Thank you, I did not know that. is the number after the ignore the type of warning to ignore?
R ronell Well-Known Member Licensed User Longtime User Jun 8, 2017 #9 Smee said: Thank you, I did not know that. is the number after the ignore the type of warning to ignore? Click to expand... yes .. it will ignore all files that is not added in the file tab Upvote 0
Smee said: Thank you, I did not know that. is the number after the ignore the type of warning to ignore? Click to expand... yes .. it will ignore all files that is not added in the file tab