Voting: 
Vote up!
0 Votes
1 Replies
Unanswered

Segment onPull is not available in app when my onPull function is implemented

Question asked by Hasnaa Elkhalidi on Jun 23, 2017 09:16 EDT

Here is the problem :  I am trying to implement a refresh function when the user activate the onPull event of a Segment. However in the application I am unable to pull the segment wether or not the event is implemented. In addition, the onPull event sometimes work but I can not figure out what's activating or not.   I have tried several solutions :

  • http://community.kony.com/developer/forum/getting-pull-refresh-text-android-segment-when-i-pull-segmen states that is should use a segment with the type SEGUI_VIEW_TYPE_TABLEVIEW which I am already using. In addition the segment must have the parameter screenLevelWidget set to true but as I am using Visualizer Entreprise 7.2.1 the property is replaced by the Z-index if I am not mistaken which I did set to 1 (all the element in the form have a Z-index = 1). Finally the segment is placed at the top of the form hierarchy. 
  • I tried to override the onPull event of the segment at runtime but still does not work.
  • I have read that on Android the segment must have enough data and so be bigger than its actual place on the screen for some scrollingEvent to occur. As I fill after loading it, I tried to fill the masterData manually in Visualizer with random value to see if it changes anything. 
The behaviour of the Segment seems to be very inconsistent. As I was working on other forms and touching any parameters of the Segment, the onPull would sometimes work again... Does anyone has had the same issue or have any idea what might be the cause of the random way the onPull sometimes activate. Thanks in advance !   PS : We are using an inHouse MVC architecture on the project but it should not impact the way the kony application works as the architecture was pushed by people which worked hand to hand with Kony developpers  

Vote up!
0 votes
Vote down!

Hi Hasnaa,

Please try the code given below in associating your the onPull events to your callback if you do not want to use it through IDE.

function assignEvents(){
frmHome.seg1.scrollingEvents={onPull:eventonPull,onPush:eventonPush};
}

You will need to call this in the preshow of the form.

Thank you

Rashmi Menon

Customer Success Engineering

Replied by: Jul 03, 2017 07:14 EDT
Gold