I have inflated view from xml and added it to layout:
View header = LayoutInflater.from(this).inflate(R.layout.lenta_parent_item,(FrameLayout)findViewById(R.id.frameContent), false);
header.setOnClickListener(new OnClickListener() {
public void onClick(View header) {
...some code
}
});
Main layout xml:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/frameContent">
<view ....
</FrameLayout>
When i run my app, I can see this view("header"), but when I click on it nothing happens. Event just not fired. What can i do to get click events for my view?