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();
}
});