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
Desenvolvedor Web/PHP/Vb.Net/C#
Desenvolvendo projetos para Android/Java e Windows Phone 8
Meu Portal informativo.
Meu Portal (Site) (Inclui meus apps, Curriculum Vitae e outras infos)
Meu Portal (Site) (Inclui meus apps, Curriculum Vitae e outras infos)
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,Usei essa Api https://github.com/bluejamesbond/TextJustify-AndroidFuncionou de primeira :)Obrigado
2014-04-02 9:41 GMT-03:00 Carlos Eduardo <carlosedua...@gmail.com>:
--
Carlos Eduardo Simões PelegrinEm 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--To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
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.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.--
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.







0 comentários:
Postar um comentário