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

  • Home
  • SEARCH
  • 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 3600052
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:26:45+00:00 2026-05-18T20:26:45+00:00

Dear Android hackers, I am attaching a gestureListener recognizing flings to a ListView. The

  • 0

Dear Android hackers, I am attaching a gestureListener recognizing flings to a ListView. The rows of the ListView consist of a LinearView and some TextViews. Unfortunately, the fling is not detected, when it starts on one of the TextViews:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:background="#000000" >
        <TextView
            android:id="@+id/author"
            android:textSize="14sp"
            android:textColor="#ffffff"
            android:textStyle="bold"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"/>
        <TextView
            android:id="@+id/date"
            android:textSize="11sp"
            android:textColor="#eeeeee"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="right"/>
    </LinearLayout>
    <TextView
        android:id="@+id/text"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingTop="5dp"
        android:paddingRight="5dp"
        android:paddingLeft="5dp"
        android:textColor="#333333"

        android:paddingBottom="5dp"
        android:textSize="14sp"
        android:layout_weight="2"/>
</LinearLayout>

So, when I start the fling on the horizontal LinearLayout, everything works fine, but when I start it on the TextView at the bottom, nothing happens. It containts editable text, if that could be the problem… As is said, the Listener is attached to the ListView itself.

I’d be glad if somebody could help!

Jan Oliver

  • 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-18T20:26:45+00:00Added an answer on May 18, 2026 at 8:26 pm

    Your editable TextView is returning true from onTouch(), preventing the event from being processed by the LinearLayout higher up the view hierarchy.

    There is nothing stopping you attaching a custom OnTouchListener to your TextView to override this and pass the event to your existing GestureDetector.

    textView.setOnTouchListener(new OnTouchListener() {
        public boolean onTouch(View arg0, MotionEvent ev) {             
            return gestureDetector.onTouchEvent(ev);
        }           
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dear g++ hackers, I have the following question. When some data of an object
dear all, i'll take some data from the database. and join two tables.the code
Dear Stacktoverflow, can you show me an example of how to use a QScrollBar?
Given a document written with normal quotes, e.g. Ben said buttons, dear sir. I
Dear all, I am writing a python program that is retrieving edifact log messages
Dear all, I save formatted text (bold, changed in font, style...etc) in an nvarchar(max)
Dear all, I have a question about Facebook Page: ( NOT user profile page,
Dear all: In advance, thank you for your time. Lately, I have decided to
Dear Friends good afternoon. My problem may be this is very basic one i.e.
Dear all, I now have a preliminary macro (defmacro key-if(test &key then else) `(cond

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.