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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:25:07+00:00 2026-05-30T23:25:07+00:00

I have a few edittext within a listview. i have a generic focuslistener on

  • 0

I have a few edittext within a listview. i have a generic focuslistener on the edittext that updates the value of the data model and also the background of the edittext when focus is lost by calling notifydatachanged . The problem is that if one of the edittext is holding focus, when i touch the next edittext, it gains focus momentarily then loses focus. I suspect it is due to the notifydatachanged method call that is causing all views to be redrawn, after which the focus is lost. Does anyone have a suggestion or work around on the issue? Thanks.

  • 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-30T23:25:08+00:00Added an answer on May 30, 2026 at 11:25 pm

    It is indeed happening because all the views are redrawn, so the edit text representing whatever row used to be focused is now a completely different object. Set a variable in your adapter: int currentlyFocusedRow;

    in getView for your adapter: Add an onFocusChanged listener to each edit text and when that edit text gains focus, set currentlyFocusedRow = whatever row the focused edit text happens to be in. Also set any edit text that is in the currentlyFocusedRow to be focused.

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

Sidebar

Related Questions

I have multiline ListView with a few EditText. <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
I have few 'so' files that I need to load in maven java project
I wrote a custom PreferenceDialog that includes two TimePickers, an EditText, a few CheckBoxes,
I have an Android application with a few edittext boxes. The issue I am
I am learning how to create UI elements. I have created a few EditText
I have a few forms that the user has to fill in and I
I have the following app that has a textview and an edittext. When the
I have few pages that I show from my main page inside iframe .
I have a few EditText fields in the same XML layout file, I'm using
Hi I have an LinearLayout inside FrameLayout , the linear layout contains few edittext

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.