here\'s my code for main.xml
Use these
all = (TextView) this.findViewById(R.id.viewall);
pdf = (TextView) this.findViewById(R.id.pic);
in on create and then set
all.setOnclickListener(this) in oncreate() method too.Implement onClicklistener when it will show error. it will work like a charm.
Edited
TextView btn=(TextView) findViewById(R.id.accInfo);
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//DO you work here
}
});
Setting Clicklistenner to TextView will automatically make it clickable so no need of
android:clickable="true"