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

TOPIC:

Create Android Spinners in Radaee PDF or fully control the PDF combo box 5 years 8 months ago #14045

  • dpierre
  • dpierre's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Is there a way to create a Spinner in the Radaee PDF and auto populated it at runtime. Current we are forced to pre-populate and hardcode the PDF combo boxes when the PDF is initially created. But when I try to over-write the String[] values at runtime the hardcoded values supersede and lay on top. What I am looking for is to create a simple Android Spinner and manipulated based on action events. Here is some code that does not do what I needed:

String opts[] = new String[stateMapings.size()];
int cur = 0;

while (cur < opts.length) {
opts[cur] = m_annot.GetComboItem(cur);
cur++;
}
m_pCombo = new PopupWindow(LayoutInflater.from(getContext()).inflate(R.layout.pop_combo, null));
Drawable dw = new ColorDrawable(0);
m_pCombo.setFocusable(true);
m_pCombo.setTouchable(true);
m_pCombo.setBackgroundDrawable(dw);
m_pCombo.setWidth((int) (m_annot_rect[2] - m_annot_rect[0]));
if ((m_annot_rect[3] - m_annot_rect[1] - 4) * opts.length > 250)
m_pCombo.setHeight(250);
else
m_pCombo.setHeight((int) (m_annot_rect[3] - m_annot_rect[1] - 4) * opts.length);
ComboList combo = (ComboList) m_pCombo.getContentView().findViewById(R.id.annot_combo);
combo.set_opts(opts);
combo.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
m_combo_item = i;
m_pCombo.dismiss();
}
});

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

Create Android Spinners in Radaee PDF or fully control the PDF combo box 5 years 8 months ago #14047

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
The creation of a combo field is not supported, you can only edit an exisitng one.

The edit s implemented in the demo project, please check onListAnnot in PDFLayoutView

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

  • Page:
  • 1
Powered by Kunena Forum