I want to create a similar layout like the image. ListView
is on left side and its respective GridView
is shown on right. I have to create similar layout to this but I am unable to create a GridView background similar to the image. Can anyone help me out to create a similar design of GridView background which points to its respective ListView position.
Asked
Active
Viewed 635 times
0
1 Answers
1
It is a nasty solution, but you could include the arrow in your ListView's items' background. In short:
- use a selector to change the item's background depending on its state.
- Specify a background for the selected state, which includes the arrow.
- Make sure your adapter processes the selected state correctly - i.e. once you press an item, mark its content (not only the view) as selected and in the adapter's
getView
method get the selected state from the content and set it to the view.
It is not the perfect solution, but is pretty easy and should do.

Samuil Yanovski
- 2,837
- 17
- 19