안드로이드 개발 질문/답변
(글 수 45,052)
검색을 해보았느데도 TextView에서 Linkify 걸린것들은 보았지만
Dialog안에서 Linkify 거는건 본적이 없는거 같습니다.
그래서 Dialog 안에서 별의 별 수단을 다 사용해보았는데
alertdialog.setView(TextView) 등도 해보고
여러가지 해보았는데 성공하지 못했는데도
혹시 성공하신분 계시다면 도움을 바랍니다.ㅠ.ㅠ
2010.10.06 09:34:27
자문자답입니다.
아침의 맑은 정신으로 찾아서 그런가요, 하늘이 도우신...;;
final SpannableString stWeb = new SpannableString(getString(R.string.description));
Linkify.addLinks(stWeb, Linkify.WEB_URLS);
final AlertDialog aboutDialog = new AlertDialog.Builder(this)
.setMessage(stWeb).setPositiveButton("OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
}
}).create();
aboutDialog.show();
((TextView) aboutDialog.findViewById(android.R.id.message))
.setMovementMethod(LinkMovementMethod.getInstance());
((TextView) aboutDialog.findViewById(android.R.id.message)).setTextSize(13);
이런식으로 하면 되더라는..이유 설명 해주실 분 없나요..ㅠ.ㅠ