간단한 브로셔 응용 프로그램을 쓰고 있습니다. 나는 textview에 이메일 주소가있는 텍스트를 가지고있다.이메일 주소에 대한 TextView 구문 분석
<string name="wbl_contacts">
<p><strong>CONTACT</strong></p>
<p>
<strong>Where you can find us</strong>
1525 Newton St NW
Washington D.C., DC 20010
202.667.1192
For current listing of class schedule at each of our sites, e-mail <a href="mailto:[email protected]">[email protected]</a>
To learn about volunteer opportunities e-mail <a href="mailto:[email protected]">[email protected]</a>
To submit your resume for internship consideration e-mail <a href="mailto:[email protected]">[email protected]</a>
To submit work for consideration for publication in the WBL journal email <a href="mailto:[email protected]">[email protected]</a>
All other questions can be directed to <a href="mailto:[email protected]">[email protected]</a>
or call us at 202-667-1192 </p>
</string>
나는 메일 응용 프로그램과 같이 추가로 텐트 클래스를 사용하려고 시도하고는 : 전체 텍스트 뷰가 클릭 할 것처럼
//setting textviews
tv1 = (TextView)findViewById(R.id.tv1);
tv1.setMovementMethod(LinkMovementMethod.getInstance());
//tv1.setText(Html.fromHtml(getString(R.string.wbl_contacts)));
tv1.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
//This will open an email client. Find a way to use this code
//to open all email address on any android app page
Intent emailintent = new Intent(android.content.Intent.ACTION_SEND);
emailintent.setType("text/html");
emailintent.putExtra(android.content.Intent.EXTRA_EMAIL,new String[] {tv1.getText().toString()});
emailintent.putExtra(android.content.Intent.EXTRA_SUBJECT, "");
emailintent.putExtra(android.content.Intent.EXTRA_TEXT,"");
startActivity(Intent.createChooser(emailintent, "Send mail..."));
}
});
내 응용 프로그램을 실행, 그것은 보인다 심지어 이메일 링크는하지만 모두가 마치 연결될 수있는 것처럼 강조됩니다 .... 조금 잃었습니다.
모든 제안이나 도움을 주시면 대단히 감사하겠습니다.
감사합니다. –
@that_developer가 작동합니까? 그럼 제발 +1 – Warpzit
나를 위해 더 이상 작동하지 ... 이메일 주소 중 하나를 클릭하면 그것의 역할을 전체 텍스트 및 아니 이메일 애플 리케이션을 팝업 것처럼 ... –