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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:18:55+00:00 2026-05-23T17:18:55+00:00

i am using following code to display list of tags now when i select

  • 0

i am using following code to display list of tags now when i select any item a tick mark is displayed before that selected item.

and i move to next activity. now problem is when i come to this activity again using back button and scroll on that listview tick marks are displayed before many tags instead of single one i selected.

any one guide me what mistake am i doing here?

ImageView selectedTickImageView;
getview{

    if (convertView == null) {
                        convertView = mInflater.inflate(R.layout.row_tags_archives, null);
                        holder = new ViewHolder();
                        holder.tickImageView= (ImageView)convertView.findViewById(R.id.tick_image_view);
                        holder.titletextView = ( TextView )convertView.findViewById(R.id.tv_tags_archives);
                        holder.tickImageView.setTag(position);

                        convertView.setOnClickListener(new View.OnClickListener() {

                            @Override
                            public void onClick(View paramView) {
                                    if(selectedTickImageView != null){
                                        selectedTickImageView.setVisibility(View.GONE);
                                    }

                                    ImageView tickImageView = (ImageView)paramView.findViewWithTag(position);
                                    tickImageView.setVisibility(View.VISIBLE);

                                    selectedTickImageView =tickImageView;
                                    S=tags[position];
                                    S=S.replace(" ", "-");
                                    S=S.toLowerCase();
                                    Intent intent = new Intent(HPressTagsorUpdatesActivity.this ,HPressSummariesActivity.class);
                                    startActivity(intent);
                            }});

                        convertView.setTag(holder);

                      } else {
                        holder = (ViewHolder) convertView.getTag();
                      }
  • 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-23T17:18:55+00:00Added an answer on May 23, 2026 at 5:18 pm

    a class with tag + selected fields would be more efficient way to solve this problem but i have used a global selected array of boolean to keep track of selected item.

    if (convertView == null) {
                        //private Context _context = ;
                        LayoutInflater mInflater = LayoutInflater.from(HPressTagsorUpdatesActivity.this);
                        convertView = mInflater.inflate(R.layout.row_tags_archives, null);
                        holder = new ViewHolder();
                        holder.tickImageView= (ImageView)convertView.findViewById(R.id.tick_image_view);
                        holder.tickImageView.setTag(position);
                        holder.titletextView = ( TextView )convertView.findViewById(R.id.tv_tags_archives);
    
    
    
    
                        convertView.setTag(holder);
    
                      } else {
                        holder = (ViewHolder) convertView.getTag();
                      }
    
    
                    if(selected[position] == true)
                    {
                        holder.tickImageView.setVisibility(View.VISIBLE);
                    }else
                    {
                        holder.tickImageView.setVisibility(View.GONE);
    
                    }
    
    
                    convertView.setOnClickListener(new View.OnClickListener() {
    
                        @Override
                        public void onClick(View paramView) {
    
                            ImageView tickImageView = (ImageView)paramView.findViewWithTag(position);
                            tickImageView.setVisibility(View.VISIBLE);
                                selected[position] = true;
    
                                S=tags[position];
                                S=S.replace(" ", "-");
                                S=S.toLowerCase();
                                Intent intent = new Intent(HPressTagsorUpdatesActivity.this ,HPressSummariesActivity.class);
                                startActivity(intent);
                        }});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code display a list of comments using List control. The item height
friends, i am using following code to display list with radio buttons now i
Using the following code to display a list of friends from my twitter profile.
I am using the following php shuffle function code to display a list of
I'm using the following Javascript code to populate a DIV with an ordered list:
I've built a graph using the following code: G = networkx.Graph() G.add_edges_from([list(e) for e
Hallo, I using the following code from css play. this display a menu. .preload16
I get an orientation problem while using the following to code to display a
I'm using the following code to build a list of email addresses on the
I have a jquery datatable using the following code: // Test list table $('#dashboard_testlist_table').dataTable({

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.