0

I am trying to make a view to show long text on several pages and maybe some buttons.

I have view with some paging effect.

I made a button to the canvas which shows the text too.

(draw the image of the button and test the coordinates of the user's touch to find if the button is pressed).

But i have some problem with it:

If I want to try to touch the button, the view-s on touch and motion event listeners are starting to work and starting to page the view. If i am excluding some areas from the motion events, i can hit the button properly but i can not page the view because the paging is stopping when i reach the boarder of the excluded area.

So, my question is:

Is it possible to make more layers on a canvas? My idea is that the lower layer is with the text which is constant and this layers two (left and right) sides are maintained for paging (draw your fingers from that area to the left/right size) but the button is over this layer so i can properly hit the button. It is possible and it can be solved in android, or i should look after another solution?

Kara
  • 6,115
  • 16
  • 50
  • 57
user1036555
  • 59
  • 1
  • 1
  • 10
  • This sounds like an overly complicated way of going about things. Why try and re-invent the wheel? The standard Button class already exists and handles click events very well. Why not just use that? – Sound Conception Dec 09 '13 at 12:59
  • Hello!Thanks for your answer! I have to make my view with bitmaps and canvases(the paging effect works only this way and that effect is indispensable ). I can not pass a button to my view :/ That's why i am looking for alternate solutions. – user1036555 Dec 10 '13 at 06:41

0 Answers0