2014-07-18 71 views
0

我正在开发一个大学的android应用程序。我在我的应用的某些活动中提到了一个电子邮件ID。我希望用户在点击此电子邮件ID时发送邮件,因为我们通过使用mailto功能使用HTML。我搜索了所有可能的方法,但无法获得与我的要求相关的解决方案。这是我的代码的一小部分。如何在点击电子邮件ID时启用发送电子邮件?

<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="[email protected]" /> 

是否有任何可能的方法来实现这一点。请任何人指导我。

在此先感谢。

回答

0

添加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="[email protected]" /> 
+0

大:)感谢很多Apoorv。你做了我的一天。 – Web

+0

不客气。如果它有帮助,你可以接受答案。 – Apoorv

+0

肯定会做。祝你有美好的一天。 – Web

相关问题