Issue
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?
Solution
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>
Answered By - Rat-a-tat-a-tat Ratatouille
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.