Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

error when toggling between portrait and landscape mode

More
IP: 47.44.172.50 7 years 10 months ago - 7 years 10 months ago #13930 by pooja
Hi, Can you please tell where can I find this rotation method for iOS and Android cordova projects? Also, how should I save the textfield annot content.
Last edit: 7 years 10 months ago by pooja.
More
IP: 47.44.172.50 7 years 9 months ago #13937 by pooja
Hi, do you have any suggestion on this?

"Can you please tell where can I find this rotation method for iOS and Android cordova projects? Also, how should I save the textfield annot content."
More
IP: 37.183.44.177 7 years 9 months ago #13940 by federico
Hi,
I suggest you to save the textfield's text on rotation event, so you should edit - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in RDPDFViewController class like this:
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (![textFd.text isEqual: @""]) [m_view setEditBoxWithText:textFd.text]; [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] postNotificationName:@"changeOrientation" object:nil]; return YES; }
More
IP: 212.97.62.176 7 years 9 months ago #13942 by Davide
Hi,
for Android you should override the onConfigurationChanged method of PopupEditAct and here call updateAnnot() to save the new annot text.
You have to implement it in native iOS and Android in the demo project and compile for Cordova.
More
IP: 47.44.172.50 7 years 9 months ago #13954 by pooja
Hi,
doing so keeps the text. But the field loses its focus after changing orientation. Can you please tell how can I keep the focus on element which i was editing before changing orientation?
More
IP: 47.44.172.50 7 years 9 months ago #13956 by pooja
Hi, could you please suggest something on this?
"
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in RDPDFViewController class like this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (![textFd.text isEqual: @""]) [m_view setEditBoxWithText:textFd.text];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeOrientation" object:nil];
return YES;
}



doing so keeps the text. But the field loses its focus after changing orientation. Can you please tell how can I keep the focus on element which i was editing before changing orientation?
"
Time to create page: 0.389 seconds
Powered by Kunena Forum