Shouldn't the dimensions for views be set during the LOADED page event callback?
The values don't seem to be set. If I navigate to a different page and then back - the values are then set.
This is iOS - pretty sure same under Android.
Related
I have Collection View for first time on Xamarin. It works good on List, that is only once, but when items are updating (Observable collection) collection view goes crazy.
Set new ItemsSource when user is scrolling list, makes scroll to top (on old listview it stays where it was scrolled). It is annoying on both platforms. I have fixed it on iOS by setting ItemsUpdatingScrollMode = ItemsUpdatingScrollMode.KeepLastItemInView, but items are still fading when reloading.
On iOS data that are displayed and then updated are updated wrong, even if I use observable collection and implement INotifyPropertyChanged. Looks like collection view is caching data and not refresh when it should.
I thought new Xamarin Forms (5.0.0.2083) brings more usefull things but for now it brongs bugs. I will back to classic ListView.
Using Nativescript, where is the navigation in the SideDrawer stored? Should it be stored in application settings as a json string, or just loaded with an api call everytime it's needed?
every time you call $navigateTo or similar navigation strategy, you generate a kind of navigation entry (varying depending of your nativescript flavour) and this is used to tell to where back button should go if pressed.
Please note you might set clearHistory in order to take rid of the navigation entries stack.
If you use a Frame (Core / Vue) / page-router-outlet (Angular) as root for drawer content, the navigation history should be taken care by default.
Hitting the back button will automatically take you to previous page on the topmost frame's navigation stack.
I have a SD grid to show messages received from other users (a simple chat app) and every time I open this panel, the first records appears and I have to manually scroll to reach last message.
Is there a way to automatically go to last record on this grid ?
I know there is a Select() method on grids, but this can´t be used on Refresh Event, only on user events.
I´m using GX15 U6
Thanks,
Rogelio Arosemena
Yes, it is possible with Inverse Loading property
This property is available for grids in the Smart Devices generator.
By setting it to True (its default value is False), the developer will
be able to load the grid in reverse direction (i.e. the Common Grid
will be loaded from bottom to top, and the Horizontal Grid will be
loaded from right to left).
Example of use The canonical use case of inverse loading on a grid is
that of a chat messaging system. What are its characteristics? It is
loaded from bottom to top, pagination is performed with a swipe-down
gesture, and when the user refreshes it the first page will be
displayed in the lower section.
I have an up that has 2 uiscrollviews. 1 for vertical and another for horizontal content.
In my viewwillappear function I fetch the data from an API to populate these 2 views. I also have a bool to determine if the data needs to be re-fetched based on users actions from within the app. Initially this bool is set to true (fetch data) and once the information is fetched successfully I set this to false (do not fetch). If a user performs some action that requires a re-fetch, I set the bool back to true so the next time they load the view I get the new data.
The issue I am having is that the horizontal uiscrollview has a dynamic number of pages and if I need to re-fetch (after the first time the view is loaded) all my constraints fail and I am unable to see the new data. The first time the view loads everything works perfectly, it's only if I need to re-fetch is when the issue occurs.
I have tried calling
view.layoutIfNeeded()
on the superview and on the uiscrollview but that does nothing.
Thanks!
Managed to work it out. The structure of the scroll views were slightly incorrect in that I did not put the contents inside a separate container UIView.
I have a xamarin forms page with a listview and a picker. On the changed event of the picker, I populate the listview. On Windows phone, intermittently, I get this exception:
System.Windows.LayoutCycleException: Layout cycle detected. Layout could not complete
Sounds like a timeout issue due to the number of items set in the ItemSource.
I would explicitly set the height value of the ViewCell and the Children of that view cell so that Windows Phone doesn't try to calculate the height for every item
See this Xamarin Forum post for more info:
https://forums.xamarin.com/discussion/41813/layout-cycle-detected-layout-could-not-complete-after-resetting-listview-itemssource