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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:18:03+00:00 2026-06-12T09:18:03+00:00

my list row contains a check box with some other views also. when i

  • 0

my list row contains a check box with some other views also. when i check or uncheck the checkbox, its associated action listener is not fired. Following is the code snippet for getView(). Please have a look and provide me with the solution.

    public View getView(int position, View convertView, ViewGroup parent) {
        //ViewHolder holder;

        if (convertView == null) 
        {
            convertView = mInflater.inflate(R.layout.list_item, null);
            Log.i("adapter", "ADAPTER");
        }

        checkTax = (CheckBox) convertView.findViewById(R.id.check_tax);
        checkTax.setOnCheckedChangeListener(new OnCheckedChangeListener () {      
    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)          {
                        Log.i("on click", "ON CLICK");
                if (isChecked) {
                    tvSelectTaxAccount.setVisibility(View.VISIBLE);
                    spinnerTaxAcc.setVisibility(View.VISIBLE);
                    tvTaxAmt.setVisibility(View.VISIBLE);
                    editTaxAmt.setVisibility(View.VISIBLE);
                    tvAmtAfterTax.setVisibility(View.VISIBLE);
                    amtAfterTax.setVisibility(View.VISIBLE);
                    tvAmt.setText("amount before tax");
                    Log.i("checked", "CHECKED");
                }
                else
                {
                    tvSelectTaxAccount.setVisibility(View.GONE);
                    spinnerTaxAcc.setVisibility(View.GONE);
                    tvTaxAmt.setVisibility(View.GONE);
                    editTaxAmt.setVisibility(View.GONE);
                    tvAmtAfterTax.setVisibility(View.GONE);
                    amtAfterTax.setVisibility(View.GONE);
                    tvAmt.setText("AMOUNT");
                    Log.i("unchecked", "UNCHECKED");
                }
            }

        });

        tvSelectTaxAccount = (TextView) convertView.findViewById(R.id.tv_select_tax_account);
        spinnerTaxAcc = (Spinner) convertView.findViewById(R.id.spinner_tax_acc);
        spinnerTaxAcc.setOnItemSelectedListener(selectSpinnerTaxAcc);

        tvTaxAmt = (TextView) convertView.findViewById(R.id.tv_tax_amt);
        editTaxAmt = (EditText) convertView.findViewById(R.id.edit_tax_amt);
        tvAmt = (TextView) convertView.findViewById(R.id.tv_amt);
        tvAmtAfterTax = (TextView) convertView.findViewById(R.id.tv_amt_after_tax);
        amtAfterTax = (TextView) convertView.findViewById(R.id.amt_after_tax);

    spinnerTaxAcc.setOnItemSelectedListener(selectSpinnerTaxAcc);

        tvSelectTaxAccount.setVisibility(View.GONE);
        spinnerTaxAcc.setVisibility(View.GONE);

        tvTaxAmt.setVisibility(View.GONE);
        editTaxAmt.setVisibility(View.GONE);
        tvAmtAfterTax.setVisibility(View.GONE);
        amtAfterTax.setVisibility(View.GONE);

        return convertView;
    }
  • 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-12T09:18:04+00:00Added an answer on June 12, 2026 at 9:18 am

    uncomment this line //checkTax.setOnClickListener(tax); and try using a onclicklistener or try using

    checkTax.setOnCheckedChangeListener(new OnCheckedChangeListener() {
         public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    
       if(isChecked)
       {
        checkTax.setText("Check Box is checked");
       }
       else
       {
        checkTax.setText("not checked");
       }
    
    });
    

    i think even setOnCheckedChangeListener will be fired on clicking a checkbox

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

Sidebar

Related Questions

I have list view with custom row layout (list_row.xml) that contains CheckBox element: <TableLayout
I have a List with some tables from a database where each row contains
I have a large data table that contains a checkbox for each row. I
I have a usercontrol that is rendering a list of items. Each row contains
I have a form which contains list of data, I added a checkbox in
i have this customized list. each row contains an image and two lines of
I have a list view which contains a button in each row of the
I have contact list which contains (checkbox,firstname,lastname,phone). I am creating this list using html
I have two grid views containing 12 and 24 rows resp. Each row contains
I have tried to check if the List contains particular element or not using

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.