Text with references in AlertDialog TextView



  • There's two activists in the first activating the caste AlertDialog, a dialogue like that, but the references are not clinical, please,

    Here's the code from the xml of the second activate file, one TextView in which the text @string/about2

    <string name="about2">Developed by <i><a href="google.ru">Google </a></i></string>
    

    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/about2"
    android:id="@+id/textView_About"
    android:layout_marginLeft="65dp"
    android:layout_marginTop="10dp" />

    In java, the activ this activist code has been written to make references clinical and it's working correctly, but whenleading AlertDialog, the references stop being clinical, please help me.

         TextView clickableTextLink = (TextView)findViewById(R.id.textView_About);
    clickableTextLink.setMovementMethod(LinkMovementMethod.getInstance());

    here is AlertDialog

                   View myView = View.inflate(this, R.layout.about, null); //имя кастомной xml

                AlertDialog.Builder builder=new AlertDialog.Builder(this);
                builder.setView(myView);
                builder.setTitle("About");
                builder.setIcon(R.drawable.ic_info_outline_black_24dp);
                builder.setCancelable(false);
                builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        //action to do
                        dialog.dismiss();
                    }
                });
                AlertDialog alert=builder.create();
                alert.show();
    



  • It's likely that the method should be produced. setLinksClickable(true) above TextView




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2