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

TOPIC:

Edit text and Note not saving data 8 years 4 months ago #9948

  • gabmor
  • gabmor's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Hi, I have a big problem with Edit text and notes, when I write text inside them the text isn't saved, I'm using the PDFReader class from the 3.6 version and the premium trial license. the other functionalities works fine.

This is the code
public void onDismiss()
	{
		Log.d("Reader","onDismiss");
		if( m_edit_type == 1 )//edit box
		{
			EditText edit = (EditText)m_pEdit.getContentView().findViewById(R.id.annot_text);
			Log.d("Reader","Text Edit "+edit.getText().toString());//always return the wrote text
			m_annot.SetEditText(edit.getText().toString());
			Log.d("Reader", "Annot text "+m_annot.GetEditText());//always return null
			m_view.vRenderSync(m_annot_page);
			if( m_listener != null )
				m_listener.OnPageModified(m_annot_page.GetPageNo());
			PDFEndAnnot();
		}
		if( m_edit_type == 2 )//combo
		{
			if( m_sel_index >= 0 )
			{
				m_annot.SetComboItem(m_sel_index);
				m_view.vRenderSync(m_annot_page);
				if( m_listener != null )
					m_listener.OnPageModified(m_annot_page.GetPageNo());
			}
			m_sel_index = -1;
			PDFEndAnnot();
		}
		m_edit_type = 0;
	}
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                String str_subj = subj.getText().toString();
                String str_content = content.getText().toString();
                Log.d("Reader","Ok click "+m_annot);
                Log.d("Reader","Dialog text "+str_subj+" "+str_content);//always return correct text
                if(m_annot!=null) {
                    m_annot.SetPopupSubject(str_subj);//not saving
                    m_annot.SetPopupText(str_content);//not saving
                }
                dialog.dismiss();
                m_reader.PDFEndAnnot();
                m_set = false;
            }
        });
        builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
                m_reader.PDFEndAnnot();
                m_set = false;
            }
        });
        builder.setTitle("Note Content");
        builder.setCancelable(false);
        builder.setView(layout);
The topic has been locked.

Edit text and Note not saving data 8 years 4 months ago #9949

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
can you reproduce the issue with the demo project without editing code?
With all the pdfs?
With all devices?
The topic has been locked.

Edit text and Note not saving data 8 years 4 months ago #9950

  • gabmor
  • gabmor's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
In the demo code works fine
The topic has been locked.

Edit text and Note not saving data 8 years 4 months ago #9951

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
have you activated the library in your own project?
www.radaeepdf.com/support/knowledge-base...=component&kbartid=1

If yes, it must be something related to your own code.
I suggest you to follow the examples you can find in the demo project.
Look at PDFRederAct and PDFReder classes.

Check if this line returns true:
m_annot.SetEditText(edit.getText().toString());
The topic has been locked.

Edit text and Note not saving data 8 years 4 months ago #9952

  • gabmor
  • gabmor's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Hi, thanks for response but I already say that I'm using trial license. And in my own code I don't touch that part, and other functionalities works fine like add an edit text or check form checkboxes.
The topic has been locked.

Edit text and Note not saving data 8 years 4 months ago #9953

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
the line I suggest you returns true?

To test all the functionalities with your own project, you need to give it the same package name of the demo project.
The topic has been locked.
Powered by Kunena Forum