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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:09:17+00:00 2026-05-15T11:09:17+00:00

If I physically slide out the keyboard on my Moto Droid A855, it crashes

  • 0

If I physically slide out the keyboard on my Moto Droid A855, it crashes my test app with the stack trace pasted below. I don’t understand why?

Also, if I start my app with the keyboard out, my app crashes immediately on startup.

The app consists of an activity, which contains a viewflipper as the main view layout. The viewflipper contains two linearlayouts…

Stack trace:

06-10 21:10:17.652 E/AndroidRuntime( 3785): Uncaught handler: thread main exiting due to uncaught exception
06-10 21:10:17.668 E/AndroidRuntime( 3785): java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper$1@447af0b8
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:667)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ApplicationContext.unregisterReceiver(ApplicationContext.java:747)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:321)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.widget.ViewFlipper.onDetachedFromWindow(ViewFlipper.java:104)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.View.dispatchDetachedFromWindow(View.java:5835)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1076)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewRoot.dispatchDetachedFromWindow(ViewRoot.java:1570)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewRoot.doDie(ViewRoot.java:2556)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.ViewRoot.die(ViewRoot.java:2526)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:218)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.view.Window$LocalWindowManager.removeViewImmediate(Window.java:436)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3498)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3599)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ActivityThread.access$2300(ActivityThread.java:119)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1867)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.os.Looper.loop(Looper.java:123)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at android.app.ActivityThread.main(ActivityThread.java:4363)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at java.lang.reflect.Method.invokeNative(Native Method)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at java.lang.reflect.Method.invoke(Method.java:521)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-10 21:10:17.668 E/AndroidRuntime( 3785):     at dalvik.system.NativeStart.main(Native Method)
06-10 21:10:17.684 I/Process ( 1017): Sending signal. PID: 3785 SIG: 3

EDIT: added XML layout and relevant snippets from main activity.

Entire XML layout file

<?xml version="1.0" encoding="utf-8"?>


<ViewFlipper
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/vFlipper"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

                <!--  Linear Layout 1: messages and overview.  -->
                <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    >

                <TableRow android:id="@+id/TableRow01" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <TextView
                        android:text="Connection info"
                        android:id="@+id/tvCon1"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:background="#F0F0F0"
                        android:textColor="#FF0000"
                        />
                </TableRow>


                <ScrollView
                        android:id="@+id/ScrollView01"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent">

                                <TextView  
                                        android:id="@+id/tvMessages"
                                    android:layout_width="fill_parent"
                                    android:layout_height="fill_parent"
                                    android:text=""
                                    />

                </ScrollView>

        </LinearLayout>


        <!--  Linear Layout 2: settings -->
        <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    >


                <TableRow
                        android:id="@+id/TableRow03"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content">

                                <TextView
                                android:text="hello world"
                                android:id="@+id/asdfasdf2"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                />
                </TableRow>                

        </LinearLayout>

</ViewFlipper>

Code snippets from Main Activity:

/**
 * Attempt (not currently working) to work around this bug: http://code.google.com/p/android/issues/detail?id=6191
 * TODO: make it work.
 */
@Override
public void onDetachedFromWindow() {
        Log.d("Dash","OnDetachedFromWindow()");

        try {
        super.onDetachedFromWindow();
    }
    catch (Exception e) {
        ViewFlipper v = (ViewFlipper)findViewById(R.id.vFlipper);
        if (v != null) {
                Log.d("Dash","De-Bug hit. e=" + e.getMessage());
                v.stopFlipping();
        }
    }
}
  • 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-15T11:09:18+00:00Added an answer on May 15, 2026 at 11:09 am

    To resolve this issue you must

    • Define a new class called MyViewFlipper which overrides ViewFlipper (see below)
    • Reference that new class anywhere you would have previously referenced ViewFlipper
    • Define your class and layout as shown below:

    New class called MyViewFlipper. Contains the following:

    package com.gtosoft.dash; // change this to match your own app. 
    
    import android.content.Context;
    import android.util.AttributeSet;
    import android.util.Log;
    import android.widget.ViewFlipper;
    
    public class MyViewFlipper extends ViewFlipper {
    
        public MyViewFlipper(Context context, AttributeSet attrs) {
            super(context, attrs);
        }
    
        @Override
        protected void onDetachedFromWindow() {
            try{
                super.onDetachedFromWindow();
            }catch(Exception e) {
                Log.d("MyViewFlipper","Stopped a viewflipper crash");
                stopFlipping();
            }
        }
    }
    

    Now to use this “fixed” version of ViewFlipper you have to reference it in the xml layout. Since it is basically a “custom view”, you have to fully qualify the package path to MyViewFlipper, as seen here:

    <com.gtosoft.dash.MyViewFlipper
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/vFlipper"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    
        (insert all the other old layout code here)
    
    </com.gtosoft.dash.MyViewFlipper>
    

    Now the app no longer crashes on the keyboard slide event or if the app is started with slide already out. Look for this in the log:

    06-11 20:08:15.811 D/MyViewFlipper( 6106): Stopped a viewflipper crash
    

    Credit: http://code.google.com/p/android/issues/detail?id=6191

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

Sidebar

Related Questions

What are the stack and heap? Where are they located physically in a computer's
I have two physically-separate MySQL databases on which I have to run a single
We have been doing some research into physically isolating the secure and non-secure sections
I am working on an ASP.NET project which is physically located at C:\Projects\MyStuff\WebSite2. When
I need to populate a .net DataGridView from a collection physically (without data binding)
Access can open DBF (dBase) files, but instead of physically converting the data into
When code is branched in TFS using the branch method, is the code physically
I'm literally banging my head against a wall here (as in, yes, physically, at
I am testing my app on the android emulator. On one screen I have
I am creating a web app in php. i am loading content through a

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.