Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

204
Visualizações
how i can set SPACE between icon and title of Toolbar

i'm trying to change icon of Toolbar when i select item , already do this and works fin but title and icon Close together like this picture . i want to set space between them , any idea please ?

enter image description here

   public boolean onNavigationItemSelected(MenuItem item) {
    int id = item.getItemId();
    if (id == R.id.Fragment_art) {
        final String art = "<font color='#ffd159'>Art</font>";
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        getSupportActionBar().setIcon(R.mipmap.art);
        setTitle(Html.fromHtml(" Wallpapers : "+art));
    } else if (id == R.id.Fragment_Material) {
        final String Material = "<font color='#4acfd9'>Material</font>";
        setTitle(Html.fromHtml(" Wallpapers : "+Material));
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        getSupportActionBar().setIcon(R.mipmap.material);

    } else if (id == R.id.Fragment_Natural) {
        final String Natural = "<font color='#49a010'>Natural</font>";
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        getSupportActionBar().setIcon(R.mipmap.natural);
        setTitle(Html.fromHtml(" Wallpapers : "+Natural));
    } else if (id == R.id.Fragment_Animal) {
        final String Animal = "<font color='#e76541'>Animal</font>";
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        getSupportActionBar().setIcon(R.mipmap.animal);
        setTitle(Html.fromHtml("Wallpapers : "+Animal));
        }
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Try using

setTitle(Html.fromHtml("&nbsp;Wallpapers : "+art);

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda