java - Change activity label (Action bar title) from another activity? -


I was wondering if there is a way to change an activity label from any other activity?

You are only able to reach an activity frequency at a time (a visible) so that you are directly invisable Can not call setTitle calls on activity

Solution You need Global variable to store activity title (can use static variables or application fields) when click the button - you update the Global variable when the activity restarts , You set the title in the global variable in the activity by calling setTitle.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -