I am working in Flex.
I have an arraycollection which is used to fill a tilelist with images.
I am using filter method of arraycollection to filter out certain images from tilelist based on a selected value from combobox.
The issue is that when the images are filtered out they just vanish suddenly.
But I want to give some effect to them when they are filtered out, say slow fade effect or zoom effect. I tried removedEffect, hideEffect etc. but in vain.
Can anyone please help me out.
thanks.
You need to add effects to the TileList, you can see some examples at Using data effects
article.
Related
I am using xamarin.plugin.calendar. but I don't know the delegate method for disabling the past dates. anyone know this method for this. Kindly help me thanks in advance.
Thanks for sharing video.This phenomenon is normal , because here the contained ListView's height is default , it will not be changed by the count of its cell .
Here is a sample WorkAround : when tapping up option , you can dynamically change the height of ListView ,as follow:
listview.HeightRequest = heightSize;
By the way, heightSize need to be calculated when view showing. According to video , if every cell of listview is defauld height, you just need to get count of it. Then you can know the height of listview.
Note: If this workaround is not fit for you, maybe you should do as Bruno's suggestion that re-layouting interface.
To solve that you need to rework your code, and don't use ScrollView and Nested ListViews.
You can have a scrollview and, for example, Bindable Layouts (Stacklayout), to mimick the Listview.
I was hoping someone could give me some guidance on building an image gallery which loads images dynamically for a PlayBook application.I've uploaded a quick mockup of what I am trying to achieve, I want to dynamically load images into a QNX TileList or Flex equivalent and as the user scrolls through the list I want to call another 'page' of images dynamically. I have already produced an example which uses a custom cell renderer to dynamically load images but I am having problems when I attempt to identify when the user has reached the end of the list.
I have tried using the lastVisibleItem property of the list while the user is scrolling to identify if the last item visible in the list is also last in the DataProvider (so I know when I need to call for more images) but when I add images to the DataProvider it takes me back to the start of the list, can anyone tell me the reason for this?
Any advice on a different approach or how to modify the TileList would be greatly appreciated.
The scrollPosition automatically gets reset to 0 when you update the dataProvider. I've done workarounds that store the current scrollPosition before updating the dataProvider and then re-set it after the update to the dataProvider has completed. Let me know if you need some code sample and I'll see if I can dig something up.
Another option would be to use dataPaging. Here is a good example of how to do that:
http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/
I'm going insane over this issue. Basically, I have a TileList with a custom item renderer that has a TextInput in it. Let's say that the list can show 4 items at once, if there are 5 items and I edit the text on the first one, the fifth will be edited also. In general if an item is out of view, it will be change when I edit one that is showing.
Also, I had overriden the TileList class to expose the rendererArray property (so that I could access the texts on each renderer) but it will only return the renderers which are displayed.
Any help is appreciated. I need to know how to override this weird behaviour with itemrenderers that aren't currently displayed. Thanks.
Ok, if anyone runs into a similar issue, here is what you need to do:
First of all, avoid trying to iterate through the itemrenderers like I did. If you need a TextInput or another control on your TileList, make sure that these controls are bound to a property on your data object, otherwise off-screen items will have incorrect values since their itemrenderers will be recycled from the items that left the screen when you scrolled.
If you think it through, any requirement can be solved by iterating through the dataprovider instead of the itemrenderers.
Also, if you try to expose the rendererArray property like I did, notice that you will only be able to iterate through the itemrenderers that are currently displayed, since those that would belong to the items that are off-screen will not be created yet.
I hope this wasn't too confusing..
I have multiple MXML custom components that I add on the fly (using a repeater) that is binded to an ArrayCollection. So everytime I add/remove item from the ArrayColleciton new items show/disappear from the screen.
Is there a straightforward way to make item fade in when they get created and fade out when they are removed? I thought of using states and state transition effects but that will make things a bit complicated at different part of my application for those components to manage the states.
You need "Data effects" not "State Transitions". Creating the effect is the same, but the way you set it up is slightly different. Take a look at this list:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/UIComponent.html?filter_flex=4.1&filter_flashplayer=10.1&filter_air=2#top
Specifically, you'll probably want to use addedEffect when something is added and removedEffect when something is removed. You may also want to investigate hideEffect and showEffect .
So, instead of creating a transitions array, you'll set the effect like it were a style in ActionScript. In MXML, set it like it were a property on the component.
And I strongly recommend not using repeaters if there is any chance your data will scroll off the screen. A repeater will renderer every element in your dataProvider. A list, will only render those elements that display on screen. Lists are much more effecient in this regards.
i am using a data grid in flex and i am generating data from a mysql server. However, my problem is with adding a button within the datagrid so each row has one.
i have set the columns itemRenderer to mx.controls.Button although with the buttons shown in the grid there is no label on them (even though one has been set) and the assigned click event does not trigger when hitting the button. anyone have any ideas or guidance on what i am doing wrong.
Thanks
Mark
Not to worry I have sorted it. anyone with a similar issue i suggest reading this
http://www.axelscript.com/2008/02/29/using-the-itemrenderer-with-a-datagrid-in-flex/
an excellent source.