- Posts: 17
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Edit text and Note not saving data
10 years 3 months ago #9948
by gabmor
Edit text and Note not saving data was created by gabmor
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
This is the code
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;
}
Code:
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);
10 years 3 months ago #9949
by Davide
Replied by Davide on topic Edit text and Note not saving data
Hi,
can you reproduce the issue with the demo project without editing code?
With all the pdfs?
With all devices?
can you reproduce the issue with the demo project without editing code?
With all the pdfs?
With all devices?
10 years 3 months ago #9950
by gabmor
Replied by gabmor on topic Edit text and Note not saving data
In the demo code works fine
10 years 3 months ago #9951
by Davide
Replied by Davide on topic Edit text and Note not saving data
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:
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:
Code:
m_annot.SetEditText(edit.getText().toString());
10 years 3 months ago #9952
by gabmor
Replied by gabmor on topic Edit text and Note not saving data
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.
10 years 3 months ago #9953
by Davide
Replied by Davide on topic Edit text and Note not saving data
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 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.
Time to create page: 0.449 seconds