title: Interactive spinners in Android Studio
body: <p>I'm now developing a mobile application using Android Studio. I want to build two interactive spinners. SQLite database is used to get the items to display. I tried to store the first spinner's selected item in string. If the selected item in first spinner='1', the second spinner then set the adapter to display the items related. However, the result shows that the interaction failed.    </p>
  
  <pre><code>    b_spinner.setEnabled(false);
  
      mAList =mDBHelper.getListA();
      a_adapter=new ListAAdapter(this, mAList);
  
      mBList =mDBHelper.getListB();
      b_adapter=new ListBAdapter(this, mBList);
  
      a_spinner.setAdapter(a_adapter);
      final String a_selected = ((Location)a_spinner.getSelectedItem()).getA();
      a_spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
          @Override
          public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
              if(a_selected.equals("1")){
                  b_spinner.setEnabled(true);
                  b_spinner.setAdapter(b_adapter);
              }
          }
          @Override
          public void onNothingSelected(AdapterView&lt;?&gt; parent) {
          }
      });
  </code></pre>
  
  <p>I'm new to Android application development and I want to ask about is there any better ideas to build multiple interactive spinners. Thank you!</p>