Wesley Egbertsen
Wesley Egbertsen

Reputation: 710

Selected Listview item (arrow?)

Selected listview item with (arrow?)

As seen in the above picture you see this arrow at the right side that is pointing from a other layout to a selected listitem in a listview. I don't know how this is called, so I don't know what to google.

How would one achieve this?

Upvotes: 2

Views: 733

Answers (2)

DSS
DSS

Reputation: 7259

Use a selector to achieve this. such that the listview's listitemselector will be set to the custom selector that you make. Also in the selector you will have an image as that green colored selector.

for example:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_focused="true" android:drawable="@drawable/bg_green_with_arrow"></item>
<item android:state_selected="true" android:drawable="@drawable/bg_green_with_arrow"></item>
<item android:state_active="true" android:drawable="@drawable/bg_green_with_arrow"></item>
<item android:state_pressed="true" android:drawable="@drawable/bg_green_with_arrow"></item>
<item android:drawable="@drawable/bg_white_plain"></item>
</selector>

Upvotes: 3

Droid
Droid

Reputation: 419

Check this out if its of your Help. Its called the Navigation Drawer

http://manishkpr.webheavens.com/android-navigation-drawer-example-using-fragments/

Upvotes: -1

Related Questions