public class InvoiceAdapter extends ArrayAdapter<InvoiceHeader> {

        @Override public View getDropDownView(int position, View convertView, 
ViewGroup parent) {
                TextView label = new TextView(context);
                label.setWidth(700);
                label.setMinimumWidth(700);
                label.setTextColor(Color.BLACK);
                label.setTextSize(20.0f);
                label.setTypeface(font);
                
label.setText(String.format("%-30s%-10s%12s%12s",values[position].getDate(), 
values[position].getInvoice(), values[position].getAmount(), 
values[position].getPaid()));
                label.setHeight(60);
                label.setPadding(10, 10, 10, 10);
                return label;
        }
}

It would appear that the setWidth  setMinimumWidth  are completely ignored  as 
the spinner's drop down is always the same width
Even

InvoiceHeader[] invoices = DB.getInvoiceHeadlinesByClient( client ).toArray(new 
InvoiceHeader[0]);
InvoiceAdapter adapter = new InvoiceAdapter(HomeActivity.this, 
R.layout.spinner, invoices);
adapter.setDropDownViewResource(R.layout.spinner);
currentInvoice.setDropDownWidth(700);

Even the SetDropDownWidth is ignored

Using a classed ArrayAdapter   ArrayAdapter<InvoiceHeader>  What is the right 
way to set the Drop Down width ?

Thanks in advance

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to