Actionbar dynamic text size

Asked

Viewed 46 times

0

How do I place the text in the dynamically sized actionbar? I need to set in different text sizes and have to frame dynamically.

public void setarTituloActionBar(String nome){
        setTitle(nome);

    }

The set is 100%.

inserir a descrição da imagem aqui

  • 1

    How so dynamic size?

  • The text can know the Actionbar limit size and resize the text, in the example above I have a very big name for Actionbar.

1 answer

0


I recommend separating the two texts in title and subtitle

 public void setTitles(String titulo, String subtitulo){
    toolbar.setTitle(titulo);
    toolbar.setSubtitle(subtitulo);

}

setTitles("Tocando","Nome Grande de música");

Browser other questions tagged

You are not signed in. Login or sign up in order to post.