Tuesday, August 13, 2013

Re: [android-developers] Creating active html links in a dialog

    ((TextView) aDialog.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
    
    replace aDialog with your dialogs name! 


On Tue, Aug 13, 2013 at 7:46 PM, dashman <erjdriver@gmail.com> wrote:
I've got a Dialog sub-class with a textview - the view contains html with weburls.

the links are not working - here's my code

My class is derived from android.app.Dialog - in the constructor i have:

        TextView textView1 = (TextView)findViewById( R.id.about_about_textview );
        textView1.setText( Html.fromHtml( context.getString( R.string.about_notes ) ) );
        Linkify.addLinks(textView1, Linkify.WEB_URLS);
        textView1.setMovementMethod(LinkMovementMethod.getInstance());


from my main activity - i do:

                AboutDialog dialog = new AboutDialog(this);
                dialog.show();


The links show up - but they're not clickable.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Παύλος-Πέτρος Τουρνάρης
Android  & Software Developer

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate