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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:16:08+00:00 2026-06-13T04:16:08+00:00

I am creating customized list with multiple selection with help of Checkbox. At last

  • 0

I am creating customized list with multiple selection with help of Checkbox. At last i managed to set checkbox selected on list’s item selection’s event.

but when I check boxes are not being selected according to list’s selection
When I click on first row 4th row’s check box gets clicked automatically . In short sequence is not maintained.
The code with I am working is as below

  ListAdapter  adapter = new SimpleAdapter(
                    this,
                    Datalist ,
                    R.layout.customlist,
                    new String[] {"fileName","contentLength","keyPath"},
                    new int[] {R.id.title,R.id.size, R.id.path}
);
          setListAdapter(adapter);

protected void onListItemClick(ListView l, View v, int position, long id) {
            super.onListItemClick(l, v, position, id);
             ViewGroup group=(ViewGroup)v;
         CheckBox check=(CheckBox)group.findViewById(R.id.sharecheckbox); 
         check.toggle();
}
  • 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-13T04:16:10+00:00Added an answer on June 13, 2026 at 4:16 am
        ListView mainListView; 
        mainListView = (ListView) findViewById( R.id.mainListView );  
    
        // Create and populate a List of planet names.  
        String[] planets = new String[] { "Mercury", "Venus", "Earth", "Mars",  
                                          "Jupiter", "Saturn", "Uranus", "Neptune"};    
        ArrayList<String> planetList = new ArrayList<String>();  
        planetList.addAll( Arrays.asList(planets) );  
    
        // Create ArrayAdapter using the planet list.  
        listAdapter = new ArrayAdapter<String>(this, R.layout.simplerow, planetList);  
    
        // Add more planets. If you passed a String[] instead of a List<String>   
        // into the ArrayAdapter constructor, you must not add more items.   
        // Otherwise an exception will occur.  
        listAdapter.add( "Ceres" );  
        listAdapter.add( "Pluto" );  
        listAdapter.add( "Haumea" );  
        listAdapter.add( "Makemake" );  
        listAdapter.add( "Eris" );  
    
        // Set the ArrayAdapter as the ListView's adapter.  
        mainListView.setAdapter( listAdapter );        
      }  
    }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone provide the XAML for creating customized check boxes. I have attached the
I am creating a customized listview header that has the header text but also
Can anyone please help me creating highly customized UI as shown below. Labels: tab1
Description : I am creating customized title bar. The codes for customization is as
Is there an option somewhere in CDT (Juno) where I can set customized Release
I'm creating a customized WordPress theme based on an existing site. I want to
The dir() of a class can be customized by creating a special function which
I am creating a subclass of UIButton in order to create my own customized
I have a ListView that uses a customized adapter, but I can't click on
I'm currently creating my own Wordpress page with a customized css layout. How do

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.