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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:48:06+00:00 2026-05-21T09:48:06+00:00

I need to add a checkbox to this listview, I have the row.xml setup

  • 0

I need to add a checkbox to this listview, I have the row.xml setup with a textview/chrono/checkbox. Do I have to show the checkbox in my baseadapter extending? Also why does that getSystemService() error out on me?

package com.walkarchdev.tasktracker;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.Chronometer;
import android.widget.TextView;

public class TTAdapterView extends BaseAdapter {

public View v;

public TTAdapterView(Context context){
    super();

}

@Override
public View getView(int position, View convertView, ViewGroup parent){
    this.v = convertView;

    if(v==null){
        LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        v = vi.inflate(R.layout.row, null);
    }
    TextView task = (TextView)v.findViewById(R.id.textView1);
    Chronometer time = (Chronometer)v.findViewById(R.id.chronometer1);
    //Checkbox complete = (Checkbox)v.findViewById(R.id.checkBox1);

    return v;
}

@Override
public int getCount() {
    // TODO Auto-generated method stub
    return 0;
}

@Override
public Object getItem(int arg0) {
    // TODO Auto-generated method stub
    return null;
}

@Override
public long getItemId(int arg0) {
    // TODO Auto-generated method stub
    return 0;
}


}
  • 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-21T09:48:07+00:00Added an answer on May 21, 2026 at 9:48 am

    why does that getSystemService()
    error out on me?

    getSystemService() is a method on Context. Save the context passed as an argument in the constructor and use it to call the getSystemService() method

    Do I have to show the checkbox in my baseadapter extending?
    

    If you intend to use the states of checkbox then you must store it in a variable in order to monitor the checked states

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

Sidebar

Related Questions

I have a dataGrid(not dataGridView) in which i need to add Checkbox dynamically at
I need to add a specific column if it does not exist. I have
I have several places on the page where there is text Add This text
I have a situation here where I need to be able to add, delete
I have an Asp.Net repeater, which contains a textbox and a checkbox. I need
Is it possible to do this? I need to use: this.ControlName.DataBindings.Add (...) so I
I have a ListBox in winforms , C# application. i need to add to
I need add a new user group for mediawiki. The new group has more
need to add a 2nd css stylesheet to a page. do i add a
I need to add a web part zone to a wiki page. I'm opening

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.