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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:31:37+00:00 2026-06-17T18:31:37+00:00

I am trying to implement list. Here is start.xml file which have a text

  • 0

I am trying to implement list. Here is start.xml file which have a text box i which i am typing any word and a list of words will open containing this word:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/FrameLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<EditText
    android:id="@+id/start_edit"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_gravity="top|left"
    android:ems="10"
    android:hint="Type to search"
    android:paddingLeft="50dp" >

    <requestFocus />
</EditText>

for list view i am using this ListView.xml file:

<ImageView
    android:id="@+id/image_list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@drawable/abacus_thumbnail"
    android:scaleType="centerCrop" />

<ImageView
    android:id="@+id/imageView_color_list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@drawable/blue_thumbnail" />

<TextView
    android:id="@+id/title_list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/image_list"
    android:layout_marginLeft="20dp"
    android:layout_toRightOf="@+id/image_list"
    android:gravity="center"
    android:text="Abacus"
    android:textColor="#000000"
    android:textSize="30sp"
    android:textStyle="bold"
    android:typeface="sans" />

<TextView
    android:id="@+id/textView_meaning_list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/title_list"
    android:layout_below="@+id/title_list"
    android:layout_marginTop="10dp"
    android:text="TextView"
    android:textColor="#000000"
    android:textSize="25sp" />

i am using EfficientAdapetr to convert one View from one to another when my app start the EditBox will be empty and a background image . I have ClickListner on list item when a word is type a list opens and when click on item this word will open. Now problem is that when i click on item of list the background populate with word but listView not remove. on Item click i want to open my background with the word.
Here is my code:

    listAdapter = new EfficientAdapter2(this);
    setListAdapter(listAdapter);


private class EfficientAdapter2 extends BaseAdapter implements Filterable,OnItemClickListener {

    private Context context;
    LayoutInflater inflater;

    public EfficientAdapter2(Context context) {

        this.context = context;
        inflater = LayoutInflater.from(context);

    }

    public int getCount() {


        //  if(SearchWordString.isEmpty()==false)
        //  {

        return SearchWordString.size();
        /// }

        //return 0;
    }

    public Object getItem(int position) {

        return position;
    }

    public long getItemId(int position) {

        return position;
    }

    public View getView(int position, View convertView, ViewGroup parent) {
        viewHolder2 holder;
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.ListView, null);
            holder = new viewHolder2();
        //  Log.i("View","is Null");
            convertView.setTag(holder);

        } else {

            //Log.i("View","is not Null");
            holder = (viewHolder2) convertView.getTag();
        }

        holder.word = (TextView) convertView.findViewById(R.id.title_list);
        holder.meaning = (TextView) convertView
                .findViewById(R.id.textView_meaning_list);
        holder.image = (ImageView) convertView
                .findViewById(R.id.image_list);
        holder.image_color = (ImageView) convertView
                .findViewById(R.id.imageView_color_list);
        holder.cell = (RelativeLayout) convertView
                .findViewById(R.id.RelativeLayout_list);









        try {

“functionalty here”

        } catch (IOException e) {

            e.printStackTrace();
        }

        return convertView;
    }

here is onItemClick:

protected void onListItemClick(ListView l, View v, int position, long id) {////////
super.onListItemClick(l, v, position, id);

    //Log.i("Position",""+position);
    changeEverything(position);// here i am converting my ListView to
                                           Start.xml but its on happening

    motherOfIndex = position;








}
  • 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-17T18:31:38+00:00Added an answer on June 17, 2026 at 6:31 pm

    first debug your app and check weather onListItemClick() event firing. this won’t fire if you have clickable items in your listView. if that’s the case you have to set isClickable=false for all the items in ListView.xml file. in order to dismiss the the listView, you have to set it’s visibility to View.GONE

    However if you want to popup a suggestion list when something type on a EditText, this is not the best practice to do that. you can use a AutoCompleteTextView and directly set your ListView adapter to it. they it will create a listView for your and will automatically handle the set selected text to the AutoCompleteTextView and will dismiss the listView

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

Sidebar

Related Questions

I'm trying to implement a list of items on a web page in which
I'm trying to implement my own List system in Java. the List class file
I'm trying to implement a link list which stores the city name (though you
I am trying to implement a sorted list. I have created the class I
Trying to implement search functionality in list view having problem in search,here i am
I am trying to implement collatz-list using Haskel: Here's my code: collatz n |
Here is code in which I am trying to implement a queue using linked
I'm trying to implement a mailing list system for my application. I'm currently using
I'm trying to implement a linked list but get an error when compiling: intSLLst.cpp:38:
I am trying to implement a to-do-list website to practice using Django. In models.py,

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.