In Spanish we sometimes use this verbal structure to express an ongoing action:
The nuance of this structure, compared to the more usual "estar + gerund" (e.g María estaba buscando una falda roja para comprarse.), is that "andar" gives a sense of "going around" doing something, this movement being real or fictitious).
Let's see some examples:
In all these examples, verb andar loses its original meaning (to walk), like in all verbal periphrases.
If we take the first sentence given in the explanation above to see how it compares to estar + gerund:
1. María estaba buscando una falda roja para comprarse.
2. María andaba buscando una falda roja para comprarse.
In example 1 we are simply stating that María was looking to buy a red skirt for herself. However in example 2, we imply that she was looking around in different places and it has a more general/vague meaning.
For a similar structure to this one see also Using ir + [gerund] to emphasise the progression of an action.