I want to create the following-like layout spinner -
what I currently have -
my code -
private MiniProductModel selectedProduct;
private Map<String, List<String>> selectedProductAttributesMap;
.
.
.
.
@Override
    public void setProductPurchaseAttributes() {
        selectedProductAttributesMap = selectedProduct.getAttributesList();
        int startingIndex = 6;
        if (!isProductAvailable) return;
        for (Map.Entry<String, List<String>> entry : selectedProductAttributesMap.entrySet()) {
            //creating the linear layout
            LinearLayout linearLayout = new LinearLayout(this);
            linearLayout.setOrientation(LinearLayout.HORIZONTAL);
            //creating the layout params
            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            params.setMargins(25,30,25,0);
            linearLayout.setLayoutParams(params);
            //creating the text view
            TextView textView = new TextView(this);
            textView.setText(entry.getKey().concat(":"));
            textView.setLayoutParams(params);
            //creating the spinner
            Spinner spinner = new Spinner(this);
            spinner.setLayoutParams(params);
            ArrayAdapter<String> adapter = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, entry.getValue());
            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
            spinner.setAdapter(adapter);
            //adding to the linear layout
            linearLayout.addView(textView);
            linearLayout.addView(spinner);
            //adding linear layout to root view
            productDetailsViewGroup.addView(linearLayout, startingIndex);
            startingIndex++;
        }
    }
I am using the default array adapter which gives me a list of ViewHolders that contain only a TextView.
I am looking to have the ability to edit each holder as I want, so I can display images like the picture in eBay.
How can I do that given my code?


 
    