The xml layout file looks like:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@+id/my_rootViewID"
<LinearLayout>
<ImageView/>
<TextView/>
<ImageView/>
</LinearLayout>
</FrameLayout>
I have tried this:
my_view = findViewById(R.id.my_rootViewID);
my_view.setOnClickListener( new My_OnClickListener() );
My problem: This works only with the ImageViews, but the TextView is not clickable. I could set OnClickListener specifically to the TextView as well, but I have many TextViews (in other cases), so adding theese listeners would be very slow, and elaborate.