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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:41:52+00:00 2026-05-27T17:41:52+00:00

I am trying to replace the toasts in the code below with intents, but

  • 0

I am trying to replace the toasts in the code below with intents, but no matter how many methods i try they fail to work. The issue is nothing but a white screen on the emulator when loading up the application.
Any assistance would be appreciated.

    spinner.setOnItemSelectedListener(new OnItemSelectedListener()
    {

        public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            // TODO Auto-generated method stub
            switch (arg2) {
            case 0:                 
                Toast.makeText(UsefulToolsActivity.this, "Tool, Countdown. Selected.", Toast.LENGTH_SHORT).show();
                break;

            case 1:                 
                Toast.makeText(UsefulToolsActivity.this, "Tool, Countdown. Selected.", Toast.LENGTH_SHORT).show();                       
                break;

            default :                       
                break;
            }
        }

        public void onNothingSelected(AdapterView<?> arg0) {
            // TODO Auto-generated method stub
        }
    });
}

Here is the code i tried using to implement the intents

    public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            // TODO Auto-generated method stub
            switch (arg2) {
            case 0:                 
                Intent intent1 = new Intent(UsefulToolsActivity.this, CountdownActivity.class);
                startActivity(intent1);                        
                break;

            case 1:                 
                Intent intent2 = new Intent(UsefulToolsActivity.this, CountdownActivity.class);
                startActivity(intent2);                       
                break;

            default :                       
                break;
            }
        }

        public void onNothingSelected(AdapterView<?> arg0) {
            // TODO Auto-generated method stub
        }

Logcat output on application execution

    12-23 13:45:50.637: E/JavaBinder(621): !!! FAILED BINDER TRANSACTION !!!
    12-23 13:45:50.957: E/AndroidRuntime(621): FATAL EXCEPTION: main
    12-23 13:45:50.957: E/AndroidRuntime(621): java.lang.RuntimeException: Adding window failed
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.ViewRootImpl.setView(ViewRootImpl.java:491)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:301)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:215)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:140)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.Window$LocalWindowManager.addView(Window.java:537)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2507)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1986)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.os.Handler.dispatchMessage(Handler.java:99)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.os.Looper.loop(Looper.java:137)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.app.ActivityThread.main(ActivityThread.java:4424)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at java.lang.reflect.Method.invokeNative(Native Method)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at java.lang.reflect.Method.invoke(Method.java:511)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at dalvik.system.NativeStart.main(Native Method)
    12-23 13:45:50.957: E/AndroidRuntime(621): Caused by: android.os.TransactionTooLargeException
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.os.BinderProxy.transact(Native Method)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.IWindowSession$Stub$Proxy.add(IWindowSession.java:516)
    12-23 13:45:50.957: E/AndroidRuntime(621):  at android.view.ViewRootImpl.setView(ViewRootImpl.java:481)
    12-23 13:45:50.957: E/AndroidRuntime(621):  ... 16 more
  • 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-27T17:41:53+00:00Added an answer on May 27, 2026 at 5:41 pm

    Found the answer after experimenting a lot, and it ended up being i had forgotten to implement OnItemSelectedListener.

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

Sidebar

Related Questions

I am trying to replace 1234567890123456 with ************3456 with the following code: Regex.Replace(xml,@\b\d{13,16}\b, string.Concat(new
I'm trying to replace two methods in calendar module: import calendar c = calendar.HTMLCalendar(calendar.MONDAY)
I'm trying replace HTML5 Canvas to simple <div> But I don't know how to
I am trying to replace the HTML code with a heredoc statement. However, I
Trying to replace Cells(RowIndex,ColumnIndex).Value() calls by row-wise references for performance, I permanently fail at
im trying to replace a remove unnessary new lines with preg-replace but my regex
I am trying to replace some words from a string and use following code
I'm trying to replace a synchronous network call with an asynchronous one. The issue
Trying to replace this jquery code with some php server side magic: $(document).ready(function() {
I am trying to replace a node using ReplaceWith(), but noticed that it results

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.