Android - Obtaining view for Activity title and attaching click listener -


i trying crazy here. attach click listener title of activity. either need title view's id or view itself. keep in mind, not defining custom view title. set title in manifest appropriate activity. attach click listener title.

how can achieved? direction or solution appreciated. thanks.

place on oncreate of activity

final int abtitleid = getresources().getidentifier("action_bar_title", "id", "android"); findviewbyid(abtitleid).setonclicklistener(new view.onclicklistener() {  @override public void onclick(view v) {     //do     } }); 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -