没有网络意图的textview链接

问题描述:

我有一个textview格式化与html Html.fromHtml() 当我点击,例如,在href,浏览器启动。我想要的是处理该意图,并且不启动浏览器。没有网络意图的textview链接

这是我的代码:

notic = Html.fromHtml(noti.getDescripcion());     
noticiacorregida = CorrigeLinks(notic); 
lbl_descripcion.setText(noticiacorregida); 
lbl_descripcion.setMovementMethod(LinkMovementMethod.getInstance()); 

我需要保存URL中的变量,而不是启动浏览器。

谢谢

+0

你希望能在您的应用程序来查看它? – apw2012 2012-09-29 00:19:03

+0

是的,在我的应用程序中查看,或者,例如,如果我有一个URL是图像资源,在手机上启动图像查看器。我只需要在一个变量中捕获URL。 – 2012-09-29 07:40:50

那么,最好的我可以想出是一个web视图。使用此代码。首先这里是java。

package com.*.images.webview; 

import android.app.*; 
import android.os.*; 
import android.view.*; 
import android.widget.*; 
import android.content.*; 
import android.webkit.*; 

public class Site extends Activity 
{ 
    /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState) 
    { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.image); 
     WebView webView = (WebView) 
     findViewById(R.id.webview); 
      webView.loadUrl("http://examplesite.com/yourimage"); 

     } 


} 

现在这里是XML。只尝试在JAVA和URL中更改上面的包。 确保一切是正确的JAVA上述起来像的onCreate布局

<?xml version="1.0" encoding="utf-8"?> 
<WebView 
    android:id="@+id/webview" 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" 
> 

    </WebView> 
+0

???我想你不能说明我需要什么,或者我无法解释自己:( – 2012-09-29 15:44:13

+0

我很抱歉..............:'(希望你能找到一些帮助的地方 – apw2012 2012-09-29 16:43:58