help with creating links TextView, please tried many options, no help, java.lang.NullPointerException error
I tried these options:
1) add a listener
texttest.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Uri adress= Uri.parse("www.google.ru"); Intent browser= new Intent(Intent.ACTION_VIEW, adress); startActivity(browser); } }); 2)
TextView clickableTextLink = (TextView)findViewById(R.id.textView_About); clickableTextLink.setMovementMethod(LinkMovementMethod.getInstance()); 3) This method works, but you cannot create a link of the form.
<a href="google.ru.ru">Google</a>
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Адрес: google.ru" android:autoLink="web" android:linksClickable="true" android:textSize="14dp" android:id="@+id/texttest" /> 