I am making an android app for a reservation system for an office. I want it so that users can click on a seat to reserve it. Also I want the seats to be color coded once they are reserved. I only have a picture of the floor map to work with. How can I do that using an image and buttons?
I'm adding this as an answer, as it seems this is really the right way to go.
Set up a relative layout. You don't need an actual graphic of the floor plan. That would complicate things in terms of screen sizes. You will almost certainly have to allow for landscape/portrait either way.
You can use imageViews and create a grid of your entire layout. Tag each of the images in the layout as row,column, like: 01, 02, 03, 11, 12, 13, etc, and indefinitely. This way you'll know which image was clicked on. Use, by default, the "available" state for each seat. Create a secondary "unavailable" version of the graphic that you can swap in later.
When a user clicks on an image, use an onClick handler from the XML to call a function that checks the seat. If it's available, run the steps to make it unavailable, and whatever other data you need to set. If it's unavailable, do nothing.
I wrote a BubbleWrap popping game a few months ago that uses this exact sort of model, and it works great. (i'd link it up here, but I do believe that remote linking/plugging is frowned upon here)
This whole answer is very much on the surface, as it is going to require research on the particulars. But this should be enough to get you moving.