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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:07:01+00:00 2026-05-27T09:07:01+00:00

How can i make an intent on the same Activity? I have a Activity

  • 0

How can i make an intent on the same Activity?

I have a Activity Lektion which has forward and backwards buttons, and when i hit on the forward button i want to start the same Activity just with other parameters.
For that i also send a bundle with the Intent.

But the Activity isnt going to be created again as it seems…

public class Lektion extends Activity {
    private int rowCount = 0;
    private ArrayList<LektionPage> lektionPages = new ArrayList<LektionPage>();
    private int lektionPage = 0;
    private Bundle bundle;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.lektion);

        bundle = this.getIntent().getExtras();
        String lektionNummer = bundle.getString("LektionNummer");
        setTitle("Lektion "+lektionNummer);     

        try{
            lektionPage = bundle.getInt("LektionPage");
        } catch(Exception e){}

        forwardImageButton.setOnTouchListener(new OnTouchListener(){
            public boolean onTouch(View view, MotionEvent me) {
                if(lektionPage == rowCount){
                    return false;
                }
                Log.i("ontouch", ""+lektionPage);
                Intent intent = new Intent(Lektion.this, Lektion.class);
                bundle.putInt("LektionPage", lektionPage++);
                intent.putExtras(bundle);
                return true;
            }

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

    You are only creating the intent without ever firing it.

    You need to

    startActivity(intent);
    

    for the Intent to actually be executed.

    But id say you should only change the content of the activities view etc instead of creating the activity over and over again

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

Sidebar

Related Questions

Can someone tell me how I can make the following output? I have a
I have an activity A that launches B with an Intent. (B is a
I have a div #someDiv, can I create a new element and make #someDiv
I want to make sure the user wants to have something pop up by
I'm working on an activity which other 3rd parties want to use in their
I have an intent filter that looks like so: <activity android:name=com.test.Call android:label=@string/makeCall > <intent-filter>
I can make a DAO recordset in VB6/Access do anything - add data, clean
I can make Firefox not display the ugly dotted focus outlines on links with
How can make a link within a facebox window that redirects it to another
I can make a single row IKImageBrowserView by setting the [imageBrowser setContentResizingMask:NSViewWidthSizable]; but in

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.