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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:54:22+00:00 2026-06-03T12:54:22+00:00

i have this Intent Code: Intent arbeiten = new Intent(this, arbeiten.class); startActivity(arbeiten); but Eclipse

  • 0

i have this Intent Code:

Intent arbeiten = new Intent(this, arbeiten.class);
startActivity(arbeiten);

but Eclipse tells me:

The constructor Intent(new AdapterView.OnItemClickListener(){}, Class<arbeiten>) is undefined

Other (working) Intents in the same Project, but other Class looks like

Intent toolb = new Intent(this, ToolBox.class);
toolb.putExtra("json", json.toString());
startActivity(toolb);

And they are working…

The “Arbeiten”-Class looks like this:

package XXX;
import android.app.Activity;
import android.os.Bundle;

public class arbeiten extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
  • 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-03T12:54:24+00:00Added an answer on June 3, 2026 at 12:54 pm

    It is because this refers to your OnItemClickListener. There are different ways of solving this. One way is to make a reference to the context of the activity like this:

    Context mContext;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //your code
    
        mContext = this;
    }
    

    Then in your OnClickListener, change it to this:

    Intent arbeiten = new Intent(mContext, arbeiten.class);
    startActivity(arbeiten);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have the following code: Intent intent = new Intent(this,DownloadService.class); for(int i=0;i<filesArray.length;i++){ startService(intent);
I have created the alarm as shown below Intent intent = new Intent(this, Areceiver.class);
This is my code in my first activity: Intent i = new Intent(this, OtherScreen.class);
I'm opening an Activity using this: startActivity(new Intent(Parent.this, Child.class)); And on the child, I
I have this code: Intent intent = new Intent(currentActivity, nextActivity); Bundle bundle = new
i have this IntentService code which run a service once: protected void onHandleIntent(Intent intent)
I have this code: package com.powergroupbd.timer; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.CountDownTimer;
I currently have this code that creates 4 tabs using tabactivity: public class toknapp
I am very new to Android development. I have this code: Button btnLaunch; btnLaunch=(Button)findViewById(R.id.btnLaunch);
I'm a beginner in Android. Here I have this code: public class GPS extends

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.