error when toggling between portrait and landscape mode - Page 2 - RadaeePDF.com - Results from #6
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF

TOPIC: error when toggling between portrait and landscape mode

error when toggling between portrait and landscape mode 3 months 3 days ago #13930

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 38
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Last edit: by pooja.

error when toggling between portrait and landscape mode 2 months 4 weeks ago #13937

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 38
  • Thank you received: 0
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."

Please Log in or Create an account to join the conversation.

error when toggling between portrait and landscape mode 2 months 4 weeks ago #13940

  • federico
  • federico's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 50
  • Thank you received: 4
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:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if (![textFd.text isEqual: @""]) [m_view setEditBoxWithText:textFd.text];
    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"changeOrientation" object:nil];
    return YES;
}
The following user(s) said Thank You: pooja

Please Log in or Create an account to join the conversation.

error when toggling between portrait and landscape mode 2 months 4 weeks ago #13942

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
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.
The following user(s) said Thank You: pooja

Please Log in or Create an account to join the conversation.

error when toggling between portrait and landscape mode 2 months 3 weeks ago #13954

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 38
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

error when toggling between portrait and landscape mode 2 months 3 weeks ago #13956

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 38
  • Thank you received: 0
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?
"

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum