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 7620203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:52:59+00:00 2026-05-31T03:52:59+00:00

in my android app i am using expandable list view to display some text.These

  • 0

in my android app i am using expandable list view to display some text.These text contains web URLs so i want to set clickable to these URLs to go to the requested web page.i have added following xml line to my group layout to display links on my expandable list view.

android:autoLink="web"

It displays URLs with blue color but expandable list is not expanding and when i click on the link it will give following exception.How can i fix this??

Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

after clicks on the parent child view displays its contents.
so i want to do is to set url clickable which display in parent.while expand and collapse the expandable list.

i did this but it also not working.

expList.setOnGroupClickListener(new OnGroupClickListener() {

            @Override
            public boolean onGroupClick(ExpandableListView parent, View v,
                    int groupPosition, long id) {

                Linkify.addLinks(groupNameContent, Linkify.WEB_URLS);
                Log.e("setOnGroupClickListener", "tested");
                return true;
            }
        });

parent is simply a text view when a user clicks on the parent it expand and display the child which contains additional details of parent: parent xml:

 <LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="5dp" >

    <TextView
        android:id="@+id/content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="5dp"
        android:textSize="11dp"
        android:textStyle="normal"

         />
  • 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-31T03:53:00+00:00Added an answer on May 31, 2026 at 3:53 am

    I will give you a different scenario which will accomplish the same target. That meas when you click on the ExpandableListView parent item, it will show the children. Then by clicking the same parent item will collapse the parent and ask the user whether he/she wants to go to any link which is in the parent text. Following images will show you what I am going to do here.
    Expandable list view (Figure 1)
    enter image description here

    Expandable list view after click on a parent item
    enter image description here

    Give the options for user to choose to go to a link or back to normal interface
    enter image description here

    • You have used OnGroupClickListener but I am using
      OnGroupCollapseListener.
    • Next step is to get the content of the clicked parent item. You can
      do it using getGroup(groupPosition)
    • Then extract the URL part and show it in a Dialog as in figure 3
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Expandable List view. In my app both the group and child have
I'm building an Android app and I want to copy the text value of
We have an Android app and a Web Service. We want to download part
I have an Android app with a ListActivity in the main view. The list
I've built a Jquery Mobile Android App using Phonegap which contains a form with
I want to be able to make an iphone and android app using php.
I want to implement a RESTful webservice for an Android App using JSON. Do
I have a web app, that also has an iPhone and Android app using
I have a working android app using TextView, some formatting (line breaks, rows of
Im doing some research to build an iOS and Android app using titanium appcelerator.

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.