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

Create Android Spinners in Radaee PDF or fully control the PDF combo box

More
IP: 47.145.117.154 7 years 7 months ago #14045 by dpierre
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();
}
});
More
IP: 93.36.218.154 7 years 7 months ago #14047 by nermeen
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
Time to create page: 0.378 seconds
Powered by Kunena Forum