0

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.

enter image description here

Blo
  • 11,903
  • 5
  • 45
  • 99
Aj_31
  • 187
  • 2
  • 6

1 Answers1

1

It is a nasty solution, but you could include the arrow in your ListView's items' background. In short:

  1. use a selector to change the item's background depending on its state.
  2. Specify a background for the selected state, which includes the arrow.
  3. 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