In my textbook, there is only this very small explanation of this usage of かと思えば, and I can only find explanations online of it in the "No sooner than" context, like here
Below is the section from the textbook:
6)ロボットが登場するかと思えば、花も歌い出す。
*いろいろあることを示す表現
1このビルは中華料理店があるかと思えば、インド料理の店もある。
2公園にはジョギングをしている人もいるかと思えば、寝ている人もいる。
Please could someone explain かと思えば in this いろいろ sense?