Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I dynamically load the title of a Scrolling Activity based on user input?

Tags:

java

android

I'm making an app where, so far, the user selects a place through the Google Places API, then a new scrolling activity appears and gives details about the place. How can I change the title of the scrolling activity based on the name of the place the user chooses?

like image 437
felix Avatar asked Dec 06 '22 19:12

felix


1 Answers

CollapsingToolbarLayout toolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout);
toolbarLayout.setTitle("New Title.");
like image 136
teardrop Avatar answered Dec 08 '22 09:12

teardrop