I created a list view and I added a header to it (by using addHeaderview(layout)), then I wrote a click event like:
LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
View itemView = inflater.inflate(R.layout.buypwr, null);
itemView.setOnClickListner(new OnClickListner(){
@Override
public void onClick(View v){
}
But this onClick event didn’t fire when I clicked on the header, so can anyone tell me how can I solve my problem?
just try this..
If you have TextView in buypwr.xml then try this