title: Android Custom listview Item Turning grey after click
body: <p>I have android listview with custom adapter.I have implemented the AdapterView.OnItemClickListener . Onclick it launches a new fragment. Now all of that works, but the listview Item turns grey after click in the background.I need it to be transparent/white.
  So I thought it must be in a selected state which I somehow have to disable. 
  This is what I have tried so far without any luck. </p>
  
  <blockquote>
    <p>listview.setSelector(android.R.color.transparent);</p>
    
    <p>listView.setFocusable(false);</p>
    
    <p>listView.setActivated(false);</p>
  </blockquote>
  
  <p>Other options such as </p>
  
  <blockquote>
    <p>in onItemClick(){
    view.setBackgroundColor(ContextCompat.getColor(getContext(),
    android.R.color.transparent));</p>
  </blockquote>
  
  <p>interesting this seems to be <strong>semi working</strong> as if I use color.red. I can see it getting red momentarily before the fragment dialog shows at that point I can see it turning grey again in the background.</p>
  
  <p>Also the <strong>odd</strong> part is that this last piece of code i.e </p>
  
  <blockquote>
    <p>view.setBackgroundColor(ContextCompat.getColor(getContext(),
    android.R.color.transparent)</p>
  </blockquote>
  
  <p>works in onItemLongPress. And it stays transparent as expected.</p>