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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:21:26+00:00 2026-05-29T08:21:26+00:00

I got in to weird problem, I can’t click on my list view… I

  • 0

I got in to weird problem, I can’t click on my list view… I have implemented it in same way the way I was doing before but, thing is it is not working.

listTags.setOnItemClickListener(new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                listTags.setSelection(position);
                Toast.makeText(getParent(), "hello", Toast.LENGTH_LONG).show();
            }
        });

I am extending Activity class

and hear is how i declare listview

listTags = (ListView) viewToLoad.findViewById(R.id.listPack);

hear is what i did in xml

 <ListView
        android:id="@+id/listPack"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginBottom="5dip"
        android:layout_marginLeft="5dip"
        android:layout_marginRight="5dip"
        android:layout_weight="1" >
    </ListView>

This is just as normal as everywhere, I can’t figure out wha tis wrong, please help me with this.

Thank you

Hear the code for adapter

adapter = new KeywordAdapter(getApplicationContext(), id,
                getLNApplication().getKeyworddetail());
listTags.setAdapter(adapter);

My KeywordAdapter class

public class KeywordAdapter extends BaseAdapter {

    public KeywordAdapter(Context context, int id, ArrayList<ArrayList<Keyword>> keywordList) {
        this.context = context;
        if (id >= keywordList.size()) {
            keyWordList = new ArrayList<Keyword>();
        } else
            keyWordList = keywordList.get(id);
    }

    // Implemented methods for BaseAdpter

    public class ViewHolder {
        TextView tagName;
        //.... more code
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        View view = convertView;

        if (view == null) {
            LayoutInflater inflater = (LayoutInflater) context
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            view = inflater.inflate(R.layout.package_tag_details, null, true);
            holder = new ViewHolder();
            holder.tagName = (TextView) view.findViewById(R.id.tagName);
            //.... more code
            holder.layout = (LinearLayout) view
                    .findViewById(R.id.linearLayout1);
            view.setTag(holder);
        } else {
            holder = (ViewHolder) view.getTag();
        }

        holder.tagName.setText(keyWordList.get(position).getName());
        ArrayList<Integer> rank = keyWordList.get(position).getRank();


        @SuppressWarnings("unused")

        holder.tagRank1.setText(rank.get(position));


        //.... more code

        return view;
    }

    public void forceReload() {
        notifyDataSetChanged();

    }
}
  • 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-29T08:21:27+00:00Added an answer on May 29, 2026 at 8:21 am

    What are the item you have placed in listView, Make all items as android:focusable="false"

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

Sidebar

Related Questions

I've got a weird problem that I can't understand... I have a simple HelloWorld
I've got a weird problem. On some pages in my Zend project i can
ive got a really weird problem. i have no clue why its not working.
Hi got a weird problem parsing JSON for some reason can't access the values
I have some really weird crash here, ive got it before, but i thought
I have a weird problem and I don't know where I am doing wrong.
Got a weird problem here. I have created a template for a ListBox based
I've got a really weird problem whereby I when I click on a UITextField
i got a weird problem regarding egrep and pipe I tried to filter a
I've got this weird problem - I'm calling ChangeServiceConfig on a newly installed service

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.