2011-05-24 66 views
1

我想要一個彈出框出來,我想在框中的文本超鏈接框中的任何有效鏈接。在我的例子中,它是一個電子郵件地址。我目前使用AlertDialog,有沒有辦法使鏈接可點擊,或者我應該嘗試其他的東西?Android中的超鏈接彈出

回答

0

取決於你想做的事情的複雜性,你可能會考慮Creating a Custom Dialog與它TextView。然後,您可以在佈局xml中的TextView上使用android:autoLink屬性。

+0

謝謝,我將使用該文檔並使其工作。再次感謝。 – Andrew 2011-05-24 17:12:02

1

我沒看到你的代碼。這是一個自定義對話框?你可以把按鈕AlerDialog

AlertDialog alertDialog = new AlertDialog.Builder(a).create(); 
    alertDialog.setTitle(title); 
    alertDialog.setMessage(message); 
    alertDialog.setButton2("OK", new DialogInterface.OnClickListener() { 
    public void onClick(DialogInterface dialog, int which) { 
      //place what you want to do here 
       return ; 
    } }); 
alertDialog.show(); 
+0

感謝您的示例。我只是在尋找按鈕附加的操作。它按我的意願工作。 – nrod 2013-02-25 16:36:50