Using HorizontalViewPager1 instead of Canvas and Imagespirite

Hello Tim,

I have done as you said excatly. Now it works a very well.
Thank you very much Tim.

Hello Tim,
I have tested in the companion it works but when I build it in apk, it shows error message.
I have try to fix the problem but I could not fix it.

I am trying to add TinyDB in order to save the last page so when I open the app again it return the last page.


hzpLogicRTL_TinyDB.aia (60.1 KB)

Try this:

hzpLogicRTLLastPage.aia (59.6 KB)

It will generate an error if you restart the app on page5.png or page6.png (because there are no pages 7, 8, or 9), and you will need to clear the tinydb tag if you do so, but the logic should be OK, if you test with pages 1-4.

Hello Tim,
I have tried the .aia it looks fine but when I go to end of page and exit then open it again it shows 0 and doesn't move

As I said, it will only work if page 1,2,3or4 are in view when you close the app

I hope there is some way to pop up a message when the user select the end page in order not let him select the end page

Try this, it will not allow any (non-existent) page to be loaded if the page number is greater than the (length of the pages list - 2). So if you go to restart with page5 visible (with only 6 pages in the list), then it will restart with page4.

hzpLogicRTLLastPageList.aia (59.9 KB)

I have tried it. When I move from left to right it works a very well. But when I am at the first page and move from right to left it pop up a message:

I cannot generate that error...

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Is it possible to overlap a menu that contains some of buttons by clicking on the image itself instead of clicking on the button?

image
hzpLogicRT_OverLap.aia (66.5 KB)

How were you doing this with Canvas and ImageSprite, or is this something new?

Why not use the popup menu extension I suggested and anchor it to the image (note I have been using vertical arrangements, which do not, by default, have a click event)

Hello Tim,
Would you please post the link of the extention so that I can understand how it works because I could not find it.

Hello Tim,

As I understood you that I cann't click on the image to popup the menu and apply the overlap on the vertical arrangements?
Isn't there any extention to be a helpful for apply that?

Already posted here in #36

Thank you so much Tim!
I hope you all the best! :slight_smile:

A couple of alternatives:

Setup a smaller vertical arrangement inside your "image" vertical arrangement with your list of buttons.
Make this not visible, then use the click event to make it visible/not visible

or

use an image component instead of a vertical arrangement to display your "image". The Image component has a click event to display your popup menu.

There are probably many other ways you could use to achieve much the same thing, with or without extensions.

Hello Tim,

I am trying to select an image by putting the number of page in the textbox but I think there is some missing block.

hzpLogicRTLLastPageList.aia (60.5 KB)

Perhaps something like this:

hzpLogicRTLLastPageListSelect.aia (61.2 KB)

I used a listpicker to display the pages that "can" be picked:

then afterPicking, assigned the desired pages to each of the vertical arrangements, then scrolling to the "first" pager component.

Note: this could be onerous once you have hundreds of pages, so your textbox approach for setting the page number may be better, with a check that it can be picked.

Thank you very much for your help Tim.

I wish you all the best!