SpannableString ss = new SpannableString("Android is a Software stack"); ClickableSpan clickableSpan = new ClickableSpan() { @Override public void onClick(View textView) { startActivity(new Intent(MyActivity.this, NextActivity.class)); } }; ss.setSpan(clickableSpan, 22, 27, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); TextView textView = (TextView) findViewById(R.id.textView); textView.setText(ss); textView.setMovementMethod(LinkMovementMethod.getInstance());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)