[英]How to enable sending email when clicked on email id?
I am developing an android app for an University. 我正在为大学开发一个android应用程序。 I have an email id mentioned in certain activity of my app.
我在我的应用的某些活动中提到了一个电子邮件ID。 I want the user to send a mail when clicked on this email id as we do using HTML using a mailto function.
我希望用户在单击此电子邮件ID时发送邮件,就像我们通过使用mailto函数使用HTML一样。 I searched all the possible way but could not get a solution relative to my requirement.
我搜索了所有可能的方法,但没有找到相对于我的要求的解决方案。 Here is a small snippet of my code.
这是我的代码的一小段。
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView5"
android:layout_below="@+id/textView5"
android:inputType="textEmailAddress"
android:text="admissions@abc.edu" />
Is there any possible way to achieve this. 有没有可能的方法来实现这一目标。 Please anyone guide me.
请任何人指导我。
Thanks in advance. 提前致谢。
Add android:autoLink="email"
to your TextView
将
android:autoLink="email"
到您的TextView
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView5"
android:layout_below="@+id/textView5"
android:autoLink="email"
android:inputType="textEmailAddress"
android:text="admissions@abc.edu" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.