1

I have a floor plan images and my requirement is to perform a task when clicking on a particular area. or is it to possible to create floor plan like this in android.

I find some solution for this but don't understand anything is there any easy solution available for this?

enter image description here

Keyur Patel
  • 172
  • 1
  • 2
  • 12

3 Answers3

2

One method is to create an image mask by using another image and coloring each section using different color. Create two ImageViews in your layout. Set visibility of the second ImageView to invisible. Then use an OnTouch listener to get color of the touched pixel. The color will correspond to a predefined area. Here is a tutorial that will help you link

Roman Svitukha
  • 1,302
  • 1
  • 12
  • 22
1

Finally got a perfect solution I find ClickableAreasImages library. I just have to define x,y co-ordination and it allows me to click on that area with zooming and scrolling functionality.

Keyur Patel
  • 172
  • 1
  • 2
  • 12
0

i understand you need suggestion to achieve your requirements , i would make movable object with transparent background and solid border to mark the spot a user want to locate , then upon click event on the needed spot a confirmation message should appear as well on this stage there is two scenario's you can do here
either you pop up a window form asking the user to insert details about the marked spot or you can set that @ the beginning during the map plane upload by dividing into static parts , when the marker object get into any spot of defined you can retrieve it's information through matching it with sliced part .

you can use phonegap technology to do that , it will help you speed up the work
beside that you can connect to remote db easily and there is already libraries on phone-gap can open /import auto cad files .

phonegap technology is platform created by adobe , it will allow you to make native mobile application for ios , android and windows , the great thing about it is you can use html / javascript on it ,after finishing the work the phonegap will generate the apk (ANDROID) , ipa (IOS) files for you as native application . i searched using npm and i found like 5 plugs for auto cad which can read auto-cad files directly as dwg ...

click here to view it

here is adobe phone-gap official plugins library

click here to view it

even to make this more easier for you , you may use this platform development called alpha software which simplify your life on development & the working deployment proccess to upload your apps to google play / apple store with phonegap. you can even upload on your own store using alpha software .

here is video libraries for alpha click here to view it

its called alpha software , i have used it and still using it for over 10 years. it can accept any web language such as html , html5 , js as for db it may work with almost all available DB's such as access , mysql , sql , oracle , mango db , here is a link for alpha software

https://www.alphasoftware.com/