Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 859807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:43:41+00:00 2026-05-15T08:43:41+00:00

I seem to be having trouble with the linkify I am using in my

  • 0

I seem to be having trouble with the linkify I am using in my Custom Adapter. For some reason I recieve the following stack track when I click on one of the links:

06-07 20:49:34.696: ERROR/AndroidRuntime(813): Uncaught handler: thread main exiting due to uncaught exception
06-07 20:49:34.745: ERROR/AndroidRuntime(813): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.app.ApplicationContext.startActivity(ApplicationContext.java:550)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.content.ContextWrapper.startActivity(ContextWrapper.java:248)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.text.style.URLSpan.onClick(URLSpan.java:62)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.text.method.LinkMovementMethod.onTouchEvent(LinkMovementMethod.java:216)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.widget.TextView.onTouchEvent(TextView.java:6560)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.View.dispatchTouchEvent(View.java:3709)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
06-07 20:49:34.745: ERROR/AndroidRuntime(813):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)

Here is the code that is calling it:

    TextView bot = new TextView( c );
    bot.setText(li.getBottomText());
    bot.setTextColor(Color.BLACK);
    bot.setTextSize(12);
    bot.setPadding(50, 35, 0, 10);
    Linkify.addLinks(bot, Linkify.ALL);
    rL.addView(bot,ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);

I understand what the error is saying but I am not sure how to fix it. Does anyone have any ideas? Thanks in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:43:42+00:00Added an answer on May 15, 2026 at 8:43 am

    Turns out the answer to this is a lot simpler than I had originally thought. The problem was that when I was passing the context to my custom adapter I was passing the getApplicationContext() which is not the same as using the this identifier.

    INCORRECT WAY:

    Context mContext = getApplicationContext();
    CustomAdapter mAdapter = new CustomAdapter( 
                    mContext,
                    itemList); 
    

    CORRECT WAY:

    CustomAdapter mAdapter = new CustomAdapter( 
                    this,
                    itemList); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble clicking or interacting with some page elements. They seem like
I've been having trouble debugging some JavaScript which normally would seem easy to fix.
I seem to be having trouble with preprocessor directives in C#. I've created a
I seem to be having trouble with Rails finding the appropriate path to a
I seem to be having trouble with Tomcat servlets and even setting up my
I seem to be having trouble reading preferences from my AppWidgetProvider class. My code
I seem to be having trouble with Threading. First let me explain how the
Iv'e pretty new to C# ATM and I seem to be having trouble with
This may be something common and trivial, but I seem to be having trouble
I seem to be having trouble with this. I have a Task table with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.