Everything works nicely if i keep the text with html links in the strings file and use:
View view = View.inflate(mContext, R.layout.general_info, null);
TextView textView = (TextView) view.findViewById(R.id.message);
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setText(R.string.general_info_message);
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setTitle(
"General Information").setView(view)
.setPositiveButton(android.R.string.ok, null)
.setIcon(R.drawable.icon);
alert = builder.create();
But if i change
textView.setText(R.string.general_info_message);
to
InputStream is = getResources().openRawResource(R.raw.general_info);
String general_info_message = new Scanner(is).useDelimiter("\\A").next();
final SpannableString s =
new SpannableString(general_info_message);
...
textView.setText(s);
and keep the text in .txt file in res/raw it just shows the text with all html tags but don`t interpret them