iOS slight shift of elements appearing in page item controller - ios

I'm encountering a little problem using a UIPageViewController (a 3 pages walkthrough) :
When I slide to change the current page, when the new page is just displaying, images and texts on it are maybe 50 pixels on the top of their normal position during an half second, and after they recover their normal places.
The shift is pretty little, but it's visible when users are trying it. I tried to remove all constraints but there is always the same problem.
Thanks for your help !

I found the problem : it was the status bar of the device (with the battery icon etc...) which was pushing down elements. So you just have to hide it.

Related

List items are not refreshing when room data change

I have a lazy-column with a pager to show items using paging-compose 1 alpha 16 (latest).
I have some issues around.
1-> Every time an item is off the screen and back again it comes with a leak on the view like it was loading the entire data.
2-> When an item is updated on DB it changes its position on the list (as expected) but it is not show in the new data.
3-> The new data is only displaying correctly when the item goes out and get back to the screen.
I follow this tutorial to achieve the actual behavior https://medium.com/simform-engineering/list-view-with-pagination-using-jetpack-compose-e131174eac8e
My paging Size is of 50 items and i have leaks even with only 15. The views are simple. They have an image and 2 texts. And i tested without the image as well and still remains the problems.
The problem with the second point was that my text where custom AndroidViews and i was missing the update state parameter. For the other problems i still waiting for help

JQuery sortable (items with various heights) moving to first or last position is troublesome

Problem
I am having problems with my sortable list with several items of various height. The problem occurs when I'm trying to move a larger item to the first or last position (which both have smaller objects). If I succeed currently depends very much on where on the larger item I click and start dragging.
If I want to move the item to the smaller bottom position I must click close to the bottom of the item for it to work, and if I want to drag it to the top position I must click closely to the top. But I want to be able to drag the item by clicking anywhere.
Some additional information
The items cannot be dragged outside the parent and the parent is only as large as it has to be and a scroll appears if it's larger than it's container. So it seems that I cannot drag the larger item past the first(smaller) item if I don't drag it in the top part of the item.
I've been trying to fix this by using cursorAt and using top:0 and another test using bottom:0 But it doesn't seem to make any difference (so I might have misunderstood how to use it). I am currently using tolerance: pointer.
I can bypass the problem of not being able to drag the larger item to the last position by temporary during the sorting increasing the height with the height of the dragged item. But it doesn't always work and its not a very good solution. And the problem of not being able to drag it to the top still appears?
I cannot change the JQuery code as in jquery-sortable-with-containment-parent-and-different-item-heights
Question:
How can I drag a larger item to the top or bottom position while allowing the user to click anywhere on the item?
Thanks for your help!
This might not solve your problem, but I thought I'd share the results of some experimenting I did today. I needed to make a sortable photo gallery with inline-block pictures of varying widths, and found that moving wider photos would be really hard work because the placeholder was smaller than the item I was moving. I ended up using this:
container.sortable({
placeholder: "photo placeholder",
start: function (event, ui) {
ui.placeholder.width(ui.item.width());
}
});
The custom placeholder classes are there to ensure the placeholder isn't hidden by default, and the start event ensures that the placeholder is the same width as the item you're about to move. This worked very well for me, and in your case, substituting height for width might work.
I also tried using containment as you have done, and found that it sometimes makes things much harder depending on the items in the row. Like you have explained, including tolerance: "pointer" helps to alleviate the issues, but if possible, removing containment generally makes the UI more forgiving.

TwebBrowser Zoom/Gesture is not working for firemonkey/iOs in XE4 when open a pdf file

I want to display PDF within iOS application, so far the only way I find is open it in TwebBrowser.
A.It is displaying in "fit to page width" zoom as default
B.There is no "zoom" function
WebBrowser1.Navigate(file://mypdf.pdf')
How to
I want to change the zoom after open the file (My solution encounter q#2)
Make the zoom work (My solution encounter q#3)
Make the gesture as work just like web page
For #1:
I chagne WebBrowser1.height/width in run-time, it will auto scale(zoom?) as "Fit to width".
Yes it works, and vertical scroll bar works with a flaw - it will not bounce back on edge -> you can scroll all the way down..
Neither the horizontal scroll, not reacting at all....
*This is because the pdf is A4, not sure what will happen for a landscape style
For #2:
Beside using button clicks to zoom, I add a gestureManager.
Then add Form1.ongesture just like the "iOS Interactive Gestures - Image Zoom" example.
Yes it works, but same thing - no vertical bounce, no horizontal scroll.
*ScrollBox does not work, it will not work with any thing has a build-in vert/hori scroll bars
For #3
:
I go even further, write control for up/down/left/right
Change WebBrowser1.Position.X/Y and WebBrowser1.height/width to make it looks like "scrolling"
Yes it works... but two custom gesture controls are making it really hard to control
(EventInfo.Distance and EventInfo.X/Y, those 2 controls are kinda overlaping to eachother if you run in iPhone)
The wosrt part is, the WebBrowser1 will be on top of ANY compenment, regardless parent/child structure .
The second worst part is the limitation of margin is hard to code, somehow it can always scroll over the limit.....
I "feel" if changing the zoom on/after open, and make it open with both vert/hori scrool bars visible.
Then the horizontal bar should work -> i only need to deal with zoom -> pretty close to prefect.
Of course the best way is to make it work like a web page, like
WebBrowser1.Navigate('http://www.embarcadero.com/') -> both scrollbars works, zoom work.
but...maybe need service pack N for this?
I appreciate for any ideas or code answers.
This damned monkey is on fire and its always hard to find an answer from it.
An article was posted today on The Hacker's Corner called Getting TWebBrowser on iOS to zoom. It suggests a one-line fix to the FMX.WebBrowser.iOS.pas unit. Does this help?
It was a bug, and fixed in the XE4 update.

Can you make a pivot scroll like a panorama?

Is it possible to achieve a panorama-like scrolling effect in the pivot? I mean instead of flying items in, scroll them in. Like when you use the panorama control and drag the item in view you can already see the next and previous items, but in the pivot you don't - the current item flies out and the next / prev one flies in.
Why am I trying to do this?
Well, as you probably know you can not programatically set the SelectedIndex on a panorama because Microsoft decided to make that property read-only. I have tried several things to fix that including extending the control and using behaviors - but I didn't succeed so I gave up.
Finally I gave up an chose to use the Pivot control instead and it works just fine, except for the scrolling part, where I'd like to have the scrolling effect from the panorama.
Why am I trying to achieve?
A current page overlay. You know, like in the Android applications screen where you can swipe trough a couple of pages and you can see at the bottom / top of your screen on which page you are on (this is the easy part) and also, when you click on one of those bubbles it scrolls to the corresponding page (that's the hard part - because you can't set the SelectedIndex on the Panorama control).
So, any ideas on how to achieve that scrolling effect in the Pivot control? or maybe got another idea on how to change the SelectedIndex on the Panorama? (changing DefaultItem is not a solution).
Thanks.
This sounds way off from the regular behavior of the Panorama/Pivot control so you might want to have a look at the source code and adapt it: http://phone.codeplex.com/
EDIT
In changeset 80787 the panorama control and the pivot control were removed. So to get the code you need to go back to a changeset from before Oct 29 2012.

Blackberry TabScroll and Focus problem

I'm a newbe for Blackberry and finding it quite difficult, I'm working on the TabControl example. I have changed the tabs to scroll. Now when i scroll through tabs the focus changes and as soon as the focus shifts to the other tab, the data for that tab appears.
I want to make these tabs clickable only, though they shall scroll but should change only on click.
And also when i use UIApplication.getApplication.pushScreen(someScreen) in the tabs, this someScreen appears out of the tabs, whereas i want to show this screen below the tabs only.
please help
You have to override onFocus(int) to not do anything when focus is moved. (You may or may not have to override touchEvent to handle an actual CLICK event).
You can push a screen into tabs that is not part of the tabs already. If you want something new to appear, try switching managers within the screen instead.

Resources