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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:53:07+00:00 2026-06-03T16:53:07+00:00

Android 2.1 via eclipse I have an activity that opens a dialog themed activity

  • 0

Android 2.1 via eclipse

I have an activity that opens a dialog themed activity via checkbox onChecked function

Im creating this new dialog themed activity with an Intent.

Problem is, how do i dismiss the dialog themed activity once i finish with it? (the way it stands now, i have to send a new intent in order to go back to the previous activity via click of a button)

Any help would be greatly apprieciated!

Code snippet:

Main activity:

cbReminder.setOnCheckedChangeListener(new OnCheckedChangeListener() {

    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
        if (isChecked)
        {                   
            Intent intent = new Intent(getApplicationContext(), DateTimeDialog.class);
            startActivity(intent);
        }
    }
});

Dialog themed activity:

public void onClick(View v) {
    if (v.getId() == R.id.b_datetime_save)
    {

    }
    else if (v.getId() == R.id.b_datetime_cancel)
    {
        finish();
        Intent intent = new Intent(getApplicationContext(), MakeNoteActivity.class);
        startActivity(intent);
    }
}
  • 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-03T16:53:08+00:00Added an answer on June 3, 2026 at 4:53 pm

    As you specified, the intent was indeed not needed to return to the previous activity and should be removed.

    To uncheck the checkbox after returning from the dialog, you can use startActivityForResult and set a callback for when you return.

    Open your dialog like this:

    Intent intent = new Intent( getApplicationContext(), DateTimeDialog.class );
    startActivityForResult( intent, UNIQUE_IDENTIFIER );
    

    Then add a callback to that same activity:

    @Override
    protected void onActivityResult( int requestCode, int resultCode, Intent data )
    {
        if ( requestCode == UNIQUE_IDENTIFIER )
        {
            cbReminder.setChecked( false );
        }
    }
    

    The UNIQUE_IDENTIFIER can be any number that uniquely identifies this dialog. Let me know if you have any more questions.

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

Sidebar

Related Questions

I know that eclipse can do this, can Intellij via the new Android support
I am new to Eclipse and Android programming in general but I have been
I have a current Android app that uses i18n via resources. res/values-es/strings.xml and so
I'm trying to develop Android apps via Java,Eclipse. I'm trying to use this example
I have just updated Eclipse, the Android SDK, and everything else that appeared updatable,
I know that a style can be inherited in android via the parent property
I'm starting Android Market via my app to search for similar products using this
I have following scenario: The Android clients communicate with a PHP server via HTTP
Is there a way to directly inspect an SQLite3 database in Android via Eclipse
My client wants to dogfood my android app. They don't have eclipse and don't

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.