Multiple spinners in an activity - can it be refactored to make it generated dynamically?
问题 I need to put multiple spinners into my activity. Number of them would be defined dynamically, it would be 2-7 items. At the moment I have something like: -- clip: Spinner spinnerOne = (Spinner) findViewById(R.id.spinnerBrowse); spinnerOne.setAdapter(new Adapter(Browse.this, R.layout.browse_spinner_rows, picsIds)); spinnerOne.setOnItemSelectedListener(this); Spinner spinnerTwo = (Spinner) findViewById(R.id.spinnerBrowse); spinnerTwo.setAdapter(new Adapter(Browse.this, R.layout.browse_spinner