Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Texto justificado

tem um erro no exemplo 2 dele, segue o codigo que funciona.

@Override  protected void onCreate(Bundle savedInstanceState)   {      super.onCreate(savedInstanceState);      setContentView(R.layout.activity_main);         final TextView txtView = (TextView) findViewById(R.id.textView);      txtView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener()      {                     boolean isJustified = false;
        float varWidht = 300; // Tamanho maximo do texto.

 @Override public boolean onPreDraw() { if(!isJustified) { TextJustifyUtils.run(txtView, varWidth); isJustified = true; } return true; } }); }



Carlos Alberto
Desenvolvedor Web/PHP/Vb.Net/C#
Desenvolvendo projetos para Android/Java e Windows Phone 8



Minha Lista de APPs publicados na loja do Android (Google Play)
Meus Apps no Google





Em 2 de abril de 2014 11:10, Jonatã Fonseca <jonatafonsec4@gmail.com> escreveu:
Usei a mesma biblioteca, tive que fazer uns ajustes para capturar o width automático conforme tamanho da tela do smartphone, mas funcionou!!

Em quarta-feira, 2 de abril de 2014 10h34min15s UTC-3, gorio escreveu:
Bacana,


Funcionou de primeira :)

Obrigado

Atenciosamente

Gorio
(www.gorio.eng.br)

 



2014-04-02 9:41 GMT-03:00 Carlos Eduardo <carlosedua...@gmail.com>:


--
Carlos Eduardo Simões Pelegrin


Em 2 de abril de 2014 09:35, Gorio <gori...@gmail.com> escreveu:
Bom dia Família !

Por acaso alguém já teve a mesma dificuldade que estou tendo agora ? 

Como deixar um texto justificado sem tem que fazer via HTML ou algo mais sofisticado ? Qual seria a forma mais simples de fazer isso ?

Obrigado

Atenciosamente

Gorio
(www.gorio.eng.br)

 

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário