@rudolf.hladik: the fragment casting to its parent activity is (sadly) the best way to achieve this today. It's pretty safe since fragments and their parent activities are typically very tied anyway but the cast is unfortunate (and stems from the fact that fragments are not generic)