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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:35:21+00:00 2026-05-28T13:35:21+00:00

Problem : in Listview swaps text inside of EditText. it happen when keyboard invisible

  • 0

Problem : in Listview swaps text inside of EditText. it happen when keyboard invisible or visible. as shown in below images.

Image 1 : when keyboard is visible

Image 2 : when keyboard is invisible

Image 3 : when keyboard is visible

Code : ListView Activity Class :

    public class DayPlannerFormActivity extends Activity {

    private TextView txtHeader;
    private Context mContext;
    private ListView lvDayplannerFrom;
    private FormDayPlannerAdapter adapter;
    private Activity activity;
    final Handler mHandler = new Handler();

    private Vector<DayPlannerForm> list = new Vector<DayPlannerForm>();
    final Runnable mUpdateResults = new Runnable() {
        public void run() {
            updateResultsInUi();
        }
    };

   @Override
   public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dayplanner);
        mContext = this;    
        activity = this;
        txtHeader = (TextView) findViewById(R.id.txtHeader);
        txtHeader.setText(R.string.haivlate);
        lvDayplannerFrom = (ListView) findViewById(R.id.lvDayplanner);
        startfetchOperation();

   }

    private void updateResultsInUi() {
        adapter= new FormDayPlannerAdapter(activity,list);
        lvDayplannerFrom.setAdapter(adapter);

    }

    protected void startfetchOperation() {
        Thread t = new Thread() {
                @Override
                public void run() {
                    getData();
                }
            };
            t.start();
        }

   private void getData() {
    try{
         list.clear();
         DayPlannerForm dpf = new  DayPlannerForm("Task Name 1","","");
         list.add(dpf);
         dpf =new  DayPlannerForm("Task Name 2","","");
         list.add(dpf);
         mHandler.post(mUpdateResults);
       } catch (Exception e){
                mHandler.post(mUpdateResults);
       }
  }
  @Override
protected void onDestroy() {
    // TODO Auto-generated method stub
    super.onDestroy();
     try{

         if(lvDayplannerFrom != null)
             lvDayplannerFrom.setAdapter(null);

     } catch (Exception e){}
} 
}

Code : List View Adapter Class

public class FormDayPlannerAdapter extends BaseAdapter {

    private Activity mActivity;
    private static Vector<DayPlannerForm> list;
    private static LayoutInflater inflater;
    private Context mContext;
    public FormDayPlannerAdapter ( Activity _activity,Vector<DayPlannerForm> _list) {
        mActivity = _activity;
        mContext = _activity;
        list = _list;
        inflater = (LayoutInflater)mActivity.getSystemService(mActivity.LAYOUT_INFLATER_SERVICE);
    }

    public static class ViewHolder{
        public TextView txtTaskName;
        public CheckBox chbAction;
        public EditText edtDecription;
    }


    public int getCount() {
        // TODO Auto-generated method stub
        return list.size();
    }


    public Object getItem(int position) {
        // TODO Auto-generated method stub
        return position;
    }


    public long getItemId(int position) {
        // TODO Auto-generated method stub
        return position;
    }


    public View getView(int position, View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub

         View vi=convertView;
            ViewHolder holder;
            if(convertView==null){
                vi = inflater.inflate(R.layout.dayplanner_listitem_form, null);
                holder=new ViewHolder();
                holder.txtTaskName=(TextView)vi.findViewById(R.id.txtTaskName);
                holder.chbAction = (CheckBox) vi.findViewById(R.id.chbAction);
                holder.edtDecription =  (EditText) vi.findViewById(R.id.edtDecription);
                vi.setTag(holder);
            }
            else
              holder=(ViewHolder)vi.getTag();

            holder.txtTaskName.setText(list.get(position).getTaskName());


        return vi;
    }

}

How to resolve this problem

  • 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-28T13:35:22+00:00Added an answer on May 28, 2026 at 1:35 pm

    Problem solve bye Adding android:windowSoftInputMode=”adjustPan” this attribute in activity tag in the manifest.xml

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

Sidebar

Related Questions

i have problem getting text from edittext inside listview when im in last edittext
I have an problem to displaying text below listview.when items are more in list
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I have problem in ListView MultiSelection. Here is my code : private ICommand _excludeCurveCommand;
I am having a problem in searching a ListView. In my activity I have
Problem: Activity A is a ListView that contains a ListAdapter , and clicking in
I have problem in validating Edittext in listview in onFocusChangeListner. My UI looks like
i have a problem with displaying listview. i have tabbed activity and one of
I have a little problem with a Listview. I can load it with listview
I have a problem, I am using the method in listview ListView.SelectedItems[0] to return

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.