title: Android spinner - expand list view
body: <p>Could you please tell me how to do a spinner that look like a list item that can be expanded?</p>
  
  <p>I need something like shown in the figure given.! While clicking the arrow image the spinner pops up and the text is hide.</p>
  
  <p><a href="https://i.stack.imgur.com/QSKm4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QSKm4.png" alt="enter image description here"></a></p>
  
  <p>I use the following code. </p>
  
  <pre><code>spin.setOnItemSelectedListener(new OnItemSelectedListener() {  
          public void onItemSelected(AdapterView parent, View view, int position, long id) {  
              // hide selection text  
               ((TextView)view).setText(null);  
              // if you want you can change background here  
          }  
          public void onNothingSelected(AdapterView parent) {
  
          }  
  
        });
  </code></pre>
  
  <p>But then also there is flashing of text above the arrow background image for a second. </p>
  
  <p>Any suggestion to avoid this?</p>