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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:01:47+00:00 2026-05-30T08:01:47+00:00

I have a ListView with edit text in each items and I want to

  • 0

I have a ListView with edit text in each items and I want to know how can I make the EditText editable.. It seems to work fine if I set the android:windowSoftInputMode="adjustPan" into the manifest but only on some devices. On some devices the soft keyboard covers the edittext.

On the other side, if I don’t put android:windowSoftInputMode="adjustPan" in the manifest, the EditText looses focus after the soft keyboard is displayed and I have to touch the EditText multiple times to make it selected and can write in it.

Please help me solve this.

Note: I’ve seen this post: Focusable EditText inside ListView and nothing helped from there and I have totally other problem than that

  • 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-30T08:01:49+00:00Added an answer on May 30, 2026 at 8:01 am

    I made a workaround for this though.. maybe will help someone

    public class EditTextListAdapter extends BaseAdapter {
    
        /* notes list */
        private ArrayList<SomeData> mSomeData = null;
        /* layout inflater instance */
        private LayoutInflater mInflater;
        /* activity context */
        private Context mContext;
    
        /* ensure that this constant is greater than the maximum list size */
        private static final int DEFAULT_ID_VALUE = -1;
        /* used to keep the note edit text row id within the list */
        private int mNoteId = DEFAULT_ID_VALUE;
    
        /**
         * EditTextListAdapter adapter class constructor
         *
         * @param context               activity context
         */
        public FirstTimesListAdapter(Context context) {
    
            /* get a layout inflater instance */
            mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            /* load the data */
            mSomeData = SomeData.instance().getData(); 
            /* keep the context */
            mContext = context;
        }
    
        /**
         * Returns the selected item
         *
         * @return selected item
         */
        public int getSelectedItem() {
            return mSelectedItem;
        }
    
        public int getCount() {
            return mSomeData.size();
        }
    
        public Object getItem(int i) {
            return mSomeData.get(i);
        }
    
        public long getItemId(int i) {
            return i;
        }
    
        public View getView(final int index, View recycledView, ViewGroup viewGroup) {
    
            ViewHolder viewHolder;
    
            if (recycledView == null) {
                /* inflate the list item */
                recycledView = mInflater.inflate(R.layout.listview_item_with_edit_text, viewGroup, false);
                /* get link to the view holder views */
                viewHolder = new ViewHolder();
                viewHolder.note = (EditText) recycledView.findViewById(R.id.first_times_note);
                recycledView.setTag(viewHolder);
            } else {
                /* reuse the same views we load the first time */
                viewHolder = (ViewHolder) recycledView.getTag();
            }
    
            /* display some notes */
            viewHolder.note.setText(mSomeData.getNotes());
    
            /* if the last id is set, the edit text from this list item was pressed */
            if (mNoteId == index) { 
    
                /* make the edit text recive focus */
                viewHolder.note.requestFocusFromTouch();
                /* make the edit text's cursor to appear at the end of the text */
                viewHolder.note.setSelection(viewHolder.note.getText().length());
    
                /* reset the last id to default value */
                mNoteId = DEFAULT_ID_VALUE;
            }
    
            /* set a touch listener on the edit text just to record the index of the edit text that was pressed */
            viewHolder.note.setOnTouchListener(new View.OnTouchListener() {
                public boolean onTouch(View view, MotionEvent motionEvent) {
                    if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
                        /* get the index of the touched list item */
                        mNoteId = index;
                    }
                    return false;
                }
            });
    
            return recycledView;
        }
    
        static class ViewHolder {        
            /* note input */
            EditText note;
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a a listview with each row having a text field and edittext
I have a ListView and a EditText . How can I filter ListView data
Hallo all, I have a ListView, which contains an EditText in each of it's
I have a layout requirement like below, Textview TextView ListView Edit Text Button Since
I currently have a custom listview with two rows of text in each item,
So I have a ListView and I want to change the color of each
I have a ListView where each item is a TextView . I want to
I have a custom listView with editText in each row to carry value entered
I've a ListView that can have 0 custom items inside (like My Downloads). Is
I have a ListView with EditText inside. Actually, when i touch an element of

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.