S Sanxion Active Member Licensed User Longtime User Nov 23, 2015 #1 Hi all I am writing an app that will allow users to 'drag and drop' certain symbols (vowel markings) from a 'toolbox' onto a word. I assume the word itself will be an image. Each letter in the word should have a position to accommodate a vowel marking - either at the top of the letter or below it. The toolbox will be positioned at the right of the screen and the word will be in the middle. What is the best way to accomplish this and is there a control available that will allow me to 'drag and drop' items onto an image? Any help would be greatly appreciated. Thanks
Hi all I am writing an app that will allow users to 'drag and drop' certain symbols (vowel markings) from a 'toolbox' onto a word. I assume the word itself will be an image. Each letter in the word should have a position to accommodate a vowel marking - either at the top of the letter or below it. The toolbox will be positioned at the right of the screen and the word will be in the middle. What is the best way to accomplish this and is there a control available that will allow me to 'drag and drop' items onto an image? Any help would be greatly appreciated. Thanks
Erel B4X founder Staff member Licensed User Longtime User Nov 23, 2015 #2 You can use the DraggableView class to drag views: https://www.b4x.com/android/forum/threads/classes-are-soon-coming.18395/#content Upvote 0
You can use the DraggableView class to drag views: https://www.b4x.com/android/forum/threads/classes-are-soon-coming.18395/#content
S Sanxion Active Member Licensed User Longtime User Nov 23, 2015 #3 Thank-you for the response. I have looked at your example and am slightly confused. Do I need to add the DraggableView class from an existing library in order to instantiate it? Upvote 0
Thank-you for the response. I have looked at your example and am slightly confused. Do I need to add the DraggableView class from an existing library in order to instantiate it?
DonManfred Expert Licensed User Longtime User Nov 23, 2015 #4 Sanxion said: in order to instantiate it? Click to expand... you need to add the class to your project first. Then you can use it... A class file is a .bas file (a module) (see example). In the ide you need to add an exiting module... IDE->Project->Add existing module. Select the .bas file you earlier copied to your projectfolder Upvote 0
Sanxion said: in order to instantiate it? Click to expand... you need to add the class to your project first. Then you can use it... A class file is a .bas file (a module) (see example). In the ide you need to add an exiting module... IDE->Project->Add existing module. Select the .bas file you earlier copied to your projectfolder
S Sanxion Active Member Licensed User Longtime User Nov 26, 2015 #5 I did as you mentioned and it works - sort of... I added 5 images - 3 of them move around the screen without issue. One of them does not move at all and one flies of the screen when it is touched. All are initialized the same way. Any ideas? Upvote 0
I did as you mentioned and it works - sort of... I added 5 images - 3 of them move around the screen without issue. One of them does not move at all and one flies of the screen when it is touched. All are initialized the same way. Any ideas?
S Sanxion Active Member Licensed User Longtime User Nov 26, 2015 #6 Apologies...I have realised my mistake...I had 2 instances of the same class referencing different images. Upvote 0
Apologies...I have realised my mistake...I had 2 instances of the same class referencing different images.