相关疑难解决方法(0)

TextView超链接不起作用?

为什么TextView超链接不起作用.

在自定义内部使用超链接dialog box.

超链接不会出现.

哪里弄错了.怎么解决它.给我指导.

XML代码是

<TextView
android:id="@+id/google_Link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:padding="10dip"
android:textSize="20dip"
android:linksClickable="true"  
android:autoLink="all"
android:textColorLink="#306EFF"
android:text="" />
Run Code Online (Sandbox Code Playgroud)

Android代码是

TextView googleLink = ( TextView ) layout.findViewById( R.id.google_Link );
googleLink.setClickable(true);
googleLink.setMovementMethod(LinkMovementMethod.getInstance());
googleLink.setText( Html.fromHtml( "<a href=`http://www.google.co.in`>Google</a>" ) );
Run Code Online (Sandbox Code Playgroud)

Android Manifest Code是

<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
Run Code Online (Sandbox Code Playgroud)

预先感谢.

xml android hyperlink android-layout

7
推荐指数
1
解决办法
5830
查看次数

标签 统计

android ×1

android-layout ×1

hyperlink ×1

xml ×1