Hi all, I'm back. Resolved the issue with canvas getting blurry with each drawing touch.
Next things that need implementation are:
Loading a photo from Gallery, problem here is that after selecting the photo, it doesn't automatically go back to the app, it remains in the gallery.
Saving is done horribly. You cannot find them in Gallery or in a newly created folder with app's name.
Color picking. Thought it would be best if there are 2 options to choose color.
One where you click on a pick color tool/button. As you hover/drag your finger across the canvas, the pixel color you are touching should be shown in a small window. Clicking a ''Confirm color selection'' button would select the colour.
The other method should be about the same but you get to choose from a palette if you swipe the screen to the left.
Cheers and thanks guys again for helping me get so far with this little project!
I've attached the .aia file.
--
Post an image of your relevant blocks please.
You say after the image is picked, it stays in the gallery. Check what you put inside the after picking event.
There's an extension from Taifun to solve the gallery refresh bug. Yes it's an Android bug. Get the extension here: http://puravidaapps.com/tools.php
You can try using the flung event, detect where the flung started and its direction. If all matches the gesture you want, then show a hidden arrangement that contains a palette.
--
First picture is from Screen1, second from Screen2
I'm trying to import the extension but I do not know how, the tutorial doesn't say how to do it. I have the code but need it in aix file or a proper url, I have none of those.
--
Where's the AfterPicking event?
--
Extension:
Download the aix file from Taifun's website.
In App Inventor 2 go here:
Thanks. I've gotten that far but when I click Import Extension is where it gets confusing
That's the Gallery Refresh code, how do I get as an url or aix file?
Attached the afterpick event aswell
--
Why do you open the gallery AFTER you picked an image? Take that block out of there (the call LoadPicture open block). The image is already loaded, you are opening the gallery again.
That is not the extension. That is the source code. Download the .aix file. The link is the first one at the bottom of the page together with the other links.
--
Oh so stupid of me.
Thanks. Loading works good now!
Not sure where I put this block?
--
Put that block right after the image is saved. You have to specify the filename in it and until you don't have a file saved, you can't possibly update the gallery to show it.
--
Doesn't work. Clearly not a good spot to put that block
--
What "does not work" means? It doesn't show on the gallery? It doesn't save the image?
Also, you are saving the image twice but refreshing the gallery with "AppPic" which is not an image because it doesn't have a .jpg or .png at the end.
Why you use "AppPic"? That's not the name of the file you want to show in the gallery, right?
--
It saves the picture somewhere but not in the Gallery. AppPic is just a placeholder name
So I changed it to AppPic.jpg for the first and delete the next apppic block?
--
You have to use the name of the file you saved, not any name or placeholder.
--
Don't quite understand. I want the app to save the edited photos with a certain name(appic01, appic02 etc), don't want to save them with the original filename of the pic.
--
You can save it with any name you want. The refresh method should be called with the same name you used to save the picture.
--
I'm misunderstanding something here. Can't make the connection
I don't see the name of any picture, just apppic.jpg
--
Like I said before, the refresh goes AFTER you save the file. You can't refresh the gallery with a file that is not saved yet because it doesn't exist and there's nothing to refresh it with.
So invert them. Save first. Refresh AFTER
Also, take a look at your file naming blocks.
As an example, if SaveCount = 14 then your file will be named AppPic.jpg14.jpg
You need to correct that to produce AppPic14.jpg
--
Good now?
It saves the photos as AppPic0.jpg AppPic1.jpg etc
That is fine I guess but they don't appear in the gallery.
--
So, you went back to saving the image twice? Nice!
--
YOU CAN'T REFRESH BEFORE SAVING! Refreshing is to make a file that you just saved show up in the gallery. If you refresh BEFORE saving, there's nothing new to add to the gallery.
--
So Screenshot 118 then?
--
118 looks good to me. Did you try it? Did it work?
--
Why bump? The last post I asked you if you tried it and you said you didn't. So, did you try it now? Did it work?
--
And I replied that it did not work :)
--
So, what "doesn't work" means? What's doing wrong.
--
It doesn't save in the gallery.
--
Well, like I said, the blocks looks good to me, so I don't know why it doesn't show in the gallery.
I do that in my phone and it works.
--
I guess I'll have to notify users to reboot and enter their folder explorer to see the pics...
At the begining of the thread you mentioned something about a flung event, but is that really needed? When I click a certain button it opens the second screen where I can pick color, but it does not corelate to the Line/Circle buttons.
--
I don't understand your question. Please give an example.
--
These should be all the related color picker related blocks
In screenshot 15 I've pointed out the button