Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF

TOPIC:

error when toggling between portrait and landscape mode 6 years 10 months ago #13930

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • 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 6 years 10 months ago #13937

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • 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 6 years 10 months ago #13940

  • federico
  • federico's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 261
  • Thank you received: 18
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 6 years 10 months ago #13942

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • 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 6 years 10 months ago #13954

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • 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 6 years 9 months ago #13956

  • pooja
  • pooja's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • 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