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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:28:09+00:00 2026-05-16T01:28:09+00:00

I want to show automatic checklist in android. For example I can have 4

  • 0

I want to show automatic checklist in android. For example I can have 4 list of item with unchecked check box adjutant to that.

After 5 sec. delay I want to check the first item then move on to second. At the end of 20 sec. I should have all 4 check box checked one by one.

Any idea how should I go on doing this ? I can use list view with checkbox opeion on ..right ??

I am a .net programmer and this is new experience for me so any comment / advise is appreciated.

  • 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-16T01:28:09+00:00Added an answer on May 16, 2026 at 1:28 am

    Here is a basic example I’ve just written:

    public class AutoChecker extends Activity {
        private CheckBox checkbox1;
        private CheckBox checkbox2;
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            checkbox1 = (CheckBox) findViewById(R.id.checkbox_1);
            checkbox2 = (CheckBox) findViewById(R.id.checkbox_2);
    
            new CheckerAsync(AutoChecker.this).execute(checkbox1, checkbox2);
        }
    
        private class CheckerAsync extends AsyncTask<CheckBox, CheckBox, Void>{
            private Activity mActivity;
    
            private CheckerAsync(Activity activity) {
                mActivity = activity;
            }
            @Override
            protected Void doInBackground(final CheckBox... checkboxes) {
                try {
                    for(int i = 0, j = checkboxes.length; i < j; i++ ){
                        Thread.sleep(5000);
                        publishProgress(checkboxes[i]);
                    }
                } catch (InterruptedException e) {}
                return null;
            }
    
            @Override
            public void onProgressUpdate(final CheckBox... checkboxes){
                mActivity.runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        checkboxes[0].setChecked(true);
                    }
                });
            }
        }
    }
    

    This is the XML layout:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
    <CheckBox
        android:id="@+id/checkbox_1"  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Checkbox 1"
        />
    <CheckBox
        android:id="@+id/checkbox_2"  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Checkbox 2"
        />
    </LinearLayout>
    

    Explanation

    It uses a class that extends AsyncTask which allows you to use threading in a easy to use/understand way. The way this class is executed is kind of simple:

    new CheckerAsync(AutoChecker.this).execute(checkbox1, checkbox2);
    

    You can add as many checkboxes as you want. For instance:

    new CheckerAsync(AutoChecker.this).execute(checkbox1, checkbox2, checkbox4, checkbox3);
    

    By the way, I don’t know why you are trying to do this. But, if it’s for testing purposes, you better take a look at the instrumentation framework.

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

Sidebar

Related Questions

We want to show a hint for a JList that the user can select
I want to show first element that is hidden by jquery. my html code
I want to show a label rotated 90 degrees (so I can put a
I want to show a message box when users trying to do any major
I have a slide show built with jQuery that pauses on hover. It has
I want to show HTML content inside Flash. Is there some way to do
I want to show a chromeless modal window with a close button in the
I want to show the publish date in the About dialog.
...I want to Show the 'delete' button when user is an admin, and show
I want to show a table of fixed width at the center of browser

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.