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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:03:44+00:00 2026-06-05T20:03:44+00:00

I am currently a relative layout is shown in a listview . Turns out

  • 0

I am currently a relative layout is shown in a listview. Turns out that when I click RelativeLayout, is always caught the click event in the list view.

I wanted to detect a gesture on the layout when it is being shown, but when I click, the item is selected from the listview that is underneath.

Anyone know a solution to this problem?

<TabHost
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/start_tabs_topbar" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:padding="0dp" >

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:padding="0dp" />

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="-4dp"
            android:layout_weight="0" />
    </LinearLayout>
</TabHost>

    <RelativeLayout
        android:id="@+id/playertab1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/back_artista"
        android:gravity="center_vertical|left"
        android:paddingLeft="15dp" >

        <LinearLayout
            android:id="@+id/music_info"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity=""
            android:orientation="horizontal" >

            <ImageView
                android:id="@+id/artist_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="9dp"
                android:layout_marginTop="4dp"
                android:src="@drawable/placeholder" />

            <LinearLayout
                xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="top"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/playlist_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="playlist_name"
                    android:textColor="#3BBEF9"
                    android:textSize="15dp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/artist_album"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="artist_album"
                    android:textColor="#EEEEEE"
                    android:textSize="11dp" />

                <TextView
                    android:id="@+id/artist_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="artist_album"
                    android:textColor="#EEEEEE"
                    android:textSize="11dp" />

                <TextView
                    android:id="@+id/artist_song"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="artist_song"
                    android:textColor="#EEEEEE"
                    android:textSize="11dp" />
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>

The listview as been inserted into:

    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:padding="0dp" />
  • 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-06-05T20:03:45+00:00Added an answer on June 5, 2026 at 8:03 pm

    If you are using GestureDetector try calling mDetector.setIsLongpressEnabled(true); first and set view long clickable via convertView.setLongClickable(true);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this layout that works correctly, a relative layout with a text view
I use following GUI setup: ListView activity CursorAdapter that feeds this list Layout for
Im trying to figure out how to align a view in relative layout to
I have an activity that contains a linear layout and a fragment placeholder. <RelativeLayout
i'm trying to write an unit test for my Android's RelativeLayout. Currently, my testcode
So currently I have: #div { position: relative; height: 510px; overflow-y: scroll; } However
Is there a ruby gem that will format dates relative to the current time?
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
I'm trying to group 3 objects in one view, and then center that view
I have a doosie of a layout problem that looks like a browser bug.

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.