 <p>I have found the solution. The problem was that I was trying to use the adapter to get an reference to the views above and below the list item clicked. Instead I could find the appropriate views by using the getChildAt() method on the parent view (the listview itself).</p> <p>It was as easy as writing:</p> <pre><code>View aboveView = parent.getChildAt(position -1) View aboveViewShadow = aboveView.findViewById(R.id.settingsListRowShadowAbove); aboveViewShadow.setVisibility(View.VISIBLE); </code></pre>