I have a simple LinearLayout with ListView inside it (match_parent both for width and height). I need a context menu to show up upon a long touch on ANY place in th
I don't think that long clicking anywhere on the ListView to get a ContextMenu it's a normal behavior, one the user will expect(especially in your case, with the user clicking the empty space below the ListView and a ListView ContextMenu would appear).
Anyway, for your example, you can set your ListView height attribute to wrap_content(If I remember right, this is the recommended value) and then register the Contextmenu for the ListView and the parent LinearLayout(of course you'll have to provide the same code for both).