Error occured while click on a TextView

This is a discussion on Error occured while click on a TextView within the Beginning Developers forums, part of the Android Development category; I want to implement a functionality that a string is displayed on an activity and when I click the string, it will be passed to ...

Results 1 to 2 of 2

Thread: Error occured while click on a TextView

  1. #1
    Android Lurker zhangzhexin_81's Avatar
    Join Date
    Jul 2011
    Posts
    4
    Thanked
    1 times

    Error occured while click on a TextView

    I want to implement a functionality that a string is displayed on an activity and when I click the string, it will be passed to another activity and displayed.
    The string was defined in string.xml like below, which name is moving_light:


    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    <string name="hello">Hello World, MainActivity!</string>
    <string name="app_name">Android</string>
    <string name="moving_light">
    This is a test string which contains a web address such as Android.com, a phone number such as 862365683350, a mail
    address such as zhexin.zhang@hotmail.com
    </string>

    </resources>
    the content in main.xml like below:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    androidrientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <TextView
    android:id="@+id/main_txt01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/moving_light"
    android:autoLink="all"
    />
    </LinearLayout>

    I found that if I add android:autoLink="all", the error occured when I click the TextView(I had add a OnClickListener to this TextView previously), but once I remove this attribute setting, I can jump to the other activity I want.
    So, could you please tell me how can I fix this issue? What is the root cause?
    The attached is my project in Eclipse.
    Android.zipAndroid.zipAndroid.zip

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    App Developer alostpacket's Avatar
    Join Date
    Jan 2011
    Location
    NY
    Posts
    240
    Thanked
    32 times
    Twitter
    alostpacket
    just post the code and the error and I can try to help, I'd rather not download a zip.

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Could not find a TextView by calling findViewById method
    By zhangzhexin_81 in forum Beginning Developers
    Replies: 2
    Last Post: 07-21-2011, 07:48 PM
  2. superuser error
    By psal217050 in forum Rescue Squad Help
    Replies: 4
    Last Post: 06-20-2011, 05:47 AM
  3. How to Draw TextView on Canvas in android..?
    By Rajesh Kalhotra in forum Beginning Developers
    Replies: 3
    Last Post: 03-09-2011, 03:41 PM
  4. How to Draw TextView on Canvas in android..?
    By Rajesh Kalhotra in forum Android Forum
    Replies: 2
    Last Post: 03-09-2011, 03:55 AM
  5. 4 click temporary root
    By G2 Forum User in forum HTC G2
    Replies: 3
    Last Post: 11-09-2010, 10:36 PM

Search tags for this page

android auto link click error
,

android autolink error

,

android click textview

,
android development app stops when autolink is clicked
,
android+development+textview+on click
,

android:autolink=all

,
click a link in textview without error in android
,
click link in textview
,
click textview android
,
click+on+a textview
,
eclipse android click textview
,
eclipse android clickable textview
,
how to draw a textview to canvas
,
textview on canvas
,
while textview android
Click on a term to search our sites for related topics.
Android Forum