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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:09:51+00:00 2026-06-12T03:09:51+00:00

I am facing error while displaying custom progress dialog. I have created progress dialog

  • 0

I am facing error while displaying custom progress dialog. I have created progress dialog with 40 different images. It woks fine. but if i try to show dialog more than 8-10 times app crash.

Error log

09-20 13:11:12.620: E/AndroidRuntime(9156): FATAL EXCEPTION: main
09-20 13:11:12.620: E/AndroidRuntime(9156): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.spec.vespa/com.spec.vespa.view.SettingsActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class <unknown>
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.ActivityThread.access$1500(ActivityThread.java:121)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.os.Handler.dispatchMessage(Handler.java:99)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.os.Looper.loop(Looper.java:138)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.ActivityThread.main(ActivityThread.java:3701)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at java.lang.reflect.Method.invokeNative(Native Method)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at java.lang.reflect.Method.invoke(Method.java:507)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at dalvik.system.NativeStart.main(Native Method)
09-20 13:11:12.620: E/AndroidRuntime(9156): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class <unknown>
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.createView(LayoutInflater.java:518)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.Dialog.setContentView(Dialog.java:421)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at com.spec.vespa.view.SettingsActivity.onCreate(SettingsActivity.java:124)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
09-20 13:11:12.620: E/AndroidRuntime(9156):     ... 11 more
09-20 13:11:12.620: E/AndroidRuntime(9156): Caused by: java.lang.reflect.InvocationTargetException
09-20 13:11:12.620: E/AndroidRuntime(9156):     at java.lang.reflect.Constructor.constructNative(Native Method)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.view.LayoutInflater.createView(LayoutInflater.java:505)
09-20 13:11:12.620: E/AndroidRuntime(9156):     ... 23 more
09-20 13:11:12.620: E/AndroidRuntime(9156): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.Bitmap.nativeCreate(Native Method)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.Bitmap.createBitmap(Bitmap.java:444)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:349)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:521)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:496)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:359)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:715)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.content.res.Resources.loadDrawable(Resources.java:1721)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.content.res.Resources.getDrawable(Resources.java:585)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.drawable.AnimationDrawable.inflate(AnimationDrawable.java:267)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:805)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.graphics.drawable.Drawable.createFromXml(Drawable.java:746)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.content.res.Resources.loadDrawable(Resources.java:1706)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.widget.ProgressBar.<init>(ProgressBar.java:215)
09-20 13:11:12.620: E/AndroidRuntime(9156):     at android.widget.ProgressBar.<init>(ProgressBar.java:170)
09-20 13:11:12.620: E/AndroidRuntime(9156):     ... 26 more

I have also do some memory management as stated below:

public void unbindDrawables(View view) {
        if (view.getBackground() != null) {
            view.getBackground().setCallback(null);
        }
        if (view instanceof ViewGroup) {
            for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {
                unbindDrawables(((ViewGroup) view).getChildAt(i));
            }
            try{
                ((ViewGroup) view).removeAllViews();
            }catch (UnsupportedOperationException e) {}
        }
    }

What I am missing ?

Progress bar xml:

<RelativeLayout android:layout_width="fill_parent"
android:layout_marginLeft="40dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/progress_context">
<ProgressBar android:layout_height="100dp"
           android:layout_width="100dp"
           android:id="@+id/prg"
           android:layout_centerHorizontal="true"
           android:layout_marginTop="10dp"
           android:drawingCacheQuality="low"
           style="@android:style/Widget.ProgressBar.Large.Inverse"
           android:indeterminateDrawable="@drawable/custom_progress_drawable"/>

<TextView android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/prg"
    android:layout_marginTop="15dp"
    android:textSize="20sp"
    android:textColor="#ffffff"
    android:text="@string/loading"
    android:paddingBottom="10dp"
    android:id="@+id/txtProgressMessage"
    android:layout_centerHorizontal="true"/>
</RelativeLayout>

  • 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-12T03:09:52+00:00Added an answer on June 12, 2026 at 3:09 am

    I got it..

    My Code :

    public class CustomProgressDialog extends ProgressDialog{
        private ImageView imageView;
        public CustomProgressDialog(Context context) {      
            super(context);
        }
    
     @Override
        public void onWindowFocusChanged(boolean hasFocus){
            imageView = (ImageView) findViewById(R.id.loadingImageView);
            AnimationDrawable myAnimation = (AnimationDrawable) imageView.getBackground();
            myAnimation.start();
        }
    
        public static CustomProgressDialog createDialog(Context context,String title,String message){
            CustomProgressDialog dialog=null;
            if(title.length()==0||title==null)
                dialog=new CustomProgressDialog(context);
            else{
                dialog=new CustomProgressDialog(context);
                dialog.setTitle(title);
            }
            dialog.getWindow().getAttributes().gravity=Gravity.CENTER;
            return dialog;
        }
    
     public void setImageCallBack(){
         if(imageView != null)
             imageView.getBackground().setCallback(null);
     }
    

    }

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

Sidebar

Related Questions

I am facing this error while running my GWT application. I have these jar
I have a problem that I am facing OuOfMemory Error while printing a string
I am facing an error while binding the service with interface stub() . Here
issue facing while loading the messages in to mq channel, recieving an error like
I am facing a weird error.I have set up my code in IntelliJ Idea.
I am facing this error while running my Java/ GWT application Any idea Thanks
Im a newbie to hibernate and I'm facing an error while trying to use
I am facing this error, Cannot create unknown Type '{clr- namespace:ActivityLibrary1;assembly=ActivityLibrary1}MyActivity1' while trying to
I'm facing a frustrating error while getting connection from mysql db. I'm using c3p0
I am facing this error while running my java application using Java Web Start.

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.