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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:41:35+00:00 2026-06-18T14:41:35+00:00

I have created a dialog using a custom xml view now i have some

  • 0

I have created a dialog using a custom xml view now i have some buttons that i want to add on click listeners and launch new activity using them. But everytime i try to create an intent it crashes my application.

         Dialog dialog = new Dialog(MainActivity.this);
     dialog.setContentView(R.layout.activity_dialog_tips);
     RelativeLayout AldikoLauncher;
     AldikoLauncher = (RelativeLayout) findViewById(R.id.launch_aldiko_tour);

        AldikoLauncher.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                pref.setGuidedActivity("MainActivity");
                Intent ShowCase1 = new Intent(MainActivity.this,ShowCaseStep1.class);
                ShowCase1.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                overridePendingTransition(R.anim.fadeout, R.anim.fadein);
                startActivity(ShowCase1);
            }
        }); 
     dialog.setTitle("Quick Tips");
     dialog.setCancelable(true);
     dialog.show();

ERROR REPORT

                02-11 06:44:04.355: E/AndroidRuntime(2202): FATAL EXCEPTION: main
            02-11 06:44:04.355: E/AndroidRuntime(2202): java.lang.NullPointerException
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.utext.unext.MainActivity.InvokeTipsLauncher(MainActivity.java:91)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.utext.unext.MainActivity.onOptionsItemSelected(MainActivity.java:80)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.app.Activity.onMenuItemSelected(Activity.java:2548)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:980)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:547)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:115)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.view.View.performClick(View.java:4202)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.view.View$PerformClick.run(View.java:17340)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.os.Handler.handleCallback(Handler.java:725)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.os.Handler.dispatchMessage(Handler.java:92)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.os.Looper.loop(Looper.java:137)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at android.app.ActivityThread.main(ActivityThread.java:5039)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at java.lang.reflect.Method.invokeNative(Native Method)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at java.lang.reflect.Method.invoke(Method.java:511)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
            02-11 06:44:04.355: E/AndroidRuntime(2202):     at dalvik.system.NativeStart.main(Native Method)
  • 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-18T14:41:36+00:00Added an answer on June 18, 2026 at 2:41 pm

    Change

    AldikoLauncher = (RelativeLayout) findViewById(R.id.launch_aldiko_tour);
    

    to

     AldikoLauncher = (RelativeLayout)dialog.findViewById(R.id.launch_aldiko_tour);
    

    because for accessing UI elements from Dialog layout you will need to use dialog

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

Sidebar

Related Questions

I want to have a custom dialog (created using layout) in Preferences . What
I have dialog created like this $('#add_error').click(function(e) { $('<div>') .load('/someaction/format/html/') .dialog({ title: 'Some title',
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created an installer using my own custom dialogs, however I am now
In using WTL/ATL/ Windows API, I have created a window dialog with buttons and
I have created a children's app that has a child lock using a custom
I have decided that I wanted to create some custom dialog classes that could
I have created a dialog and got a problem that only part of the
I have created a Dialog with two buttons Yes, No, and then I have
I have created custom jQuery UI widget called uiPopover, very similar to UI-dialog (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.