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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:56:42+00:00 2026-06-05T03:56:42+00:00

I have this code: list.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int

  • 0

I have this code:

list.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            Cursor cursor = databaseHelper.getAgendaToEdit(id);
            Intent intent = new Intent(view.getContext(), EditAgendaActivity.class);
            cursor.moveToFirst();
            intent.putExtra("id", cursor.getString(0));
            startActivity(intent);
        }
    });

and error is:

java.lang.InstantiationException: can't instantiate class com.zeroe.EditAgendaActivity; no empty constructor

The goal is to just start a new activity when clicking an item in the list. I am calling this method from my main activity, which

list 

is from as well. I assume the issue is coming from the fact that I am not getting the context from where my ListView is. Problem is it should be working because I am providing the correct context, at least I am assuming. ANy help would be much appreciated.

If anyone needs me to clarify, please let me know and I will do so right away.

  • 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-05T03:56:45+00:00Added an answer on June 5, 2026 at 3:56 am

    Your Activity subclasses all need a default constructor. Evidently EditAgendaActivity does not have one. That’s where the problem lies, and not in the code that you posted.

    Generally, you should only have a default (no-arg) constructor for an Activity subclass or no constructor at all (and let the compiler generate a no-arg constructor for you).

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

Sidebar

Related Questions

i have this code: var list = new List<int>(); for(int i=0;i<10;i++) list.Add(i); for(int i=0;i<10;i++)
Lets say I have this code: public void MyMethod(string Data, List<string> InputData) { //I
I have this Java code which is used for JSF pagination: public List<ActiveSessionObj> list(int
recently I have seen this code arrMove = new List<int[]>(4); m_pppiCaseMoveDiagLine = new int[64][][];
I have this code: FVDTO.setStatus(fail); List<String[]> invalidFields = new ArrayList<String[]>(); Iterator<ConstraintViolation<HazardSubmission>> iterator = cv.iterator();
Say I have this code - public interface ParentInterface1 { public List<? extends ChildInterface1>
If I have this code: <div class=lists> <a href=#new_list>New list</a> </div> AND $.ajax({ url:
I have this simple code public String toString() { **Iterator it = list.iterator();** String
I have this bit of code, public static List<string> GetSentencesFromWords(List<string> words, string fileContents) {
I'm following the List View tutorial and I have this code (very minor modifications):

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.