Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC:

The class Annotation: non-working getters 9 years 7 months ago #7277

  • Semenovich
  • Semenovich's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
I use the methods SetCheckValue() and SetRadio() for editing my PDF form.
switch (element.GetCheckStatus()) {
	case 0:
		element.SetCheckValue(true);
		break;
	case 1:
		element.SetCheckValue(false);
		break;
	case 2:
	case 3:
		element.SetRadio();
		break;
}
mRadaeeView.vRenderSync(page);
mListener.onFormComboButtonClick(page, element);

It works great and radiobox and checkbox buttons updated. But when I call getters for the updated object of Annotation I get illegal values:
@Override
public void onFormComboButtonClick(PDFVPage vPage, Annotation formElement) {
	Log.d(TAG, "onFormComboButtonClick: page #" + vPage.GetPageNo()
			+ ", annotation #" + formElement.GetIndexInPage()
			+ ", selected: " + formElement.GetComboItemSel()
			+ " of " + formElement.GetComboItemCount());
}
09-24 16:09:10.193: D/FormActivity(1061): onFormComboButtonClick: page #0, annotation #-1, selected: -1 of -1

Why the methods GetIndexInPage(), GetComboItemSel() and GetComboItemCount() are not working for me?

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

The class Annotation: non-working getters 9 years 7 months ago #7279

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
after set check value or combo value, PDFView refresh the page, Page and Annotation object was not aviable.
you shall re-get annotation object after page refreshed.
The following user(s) said Thank You: carpinteyroyku

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

The class Annotation: non-working getters 9 years 7 months ago #7284

  • Semenovich
  • Semenovich's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
OK, I remember page number and annotation index before calling SetCheckValue() or SetRadio() methods. Then I get annotation again using these values.

Here is the code.

But the methods GetComboItemSel() and GetComboItemCount() are still not working
09-25 12:00:20.304: D/FormActivity(21368): onFormComboButtonClick: page #2, annotation #27, selected: -1 of -1

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

Last edit: by carpinteyroyku.

The class Annotation: non-working getters 9 years 7 months ago #7285

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
to be ensure you actived premium license.
if so, you can send me PDF file.

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

The class Annotation: non-working getters 9 years 7 months ago #7286

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
oh, sorry, radio and check-box has no combo items.
combobox is a dropdown list box, and users can select 1 item to change text value.

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

Last edit: by .

The class Annotation: non-working getters 9 years 7 months ago #7288

  • Semenovich
  • Semenovich's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
Hmm... Nevertheless can I get the selected radiobox position?

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum