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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:45:22+00:00 2026-05-26T04:45:22+00:00

I have a custom 9-patch image for my spinner. This image works fine on

  • 0

I have a custom 9-patch image for my spinner. This image works fine on my phone, but causes a crash on a Motorola Xoom. Here is the stack trace:

10-10 15:52:56.487: ERROR/AndroidRuntime(4187): FATAL EXCEPTION: main
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.DealerLocatorActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.widget.Spinner
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.ActivityThread.access$500(ActivityThread.java:122)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.os.Looper.loop(Looper.java:132)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.ActivityThread.main(ActivityThread.java:4123)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at java.lang.reflect.Method.invokeNative(Native Method)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at java.lang.reflect.Method.invoke(Method.java:491)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at dalvik.system.NativeStart.main(Native Method)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.widget.Spinner
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.createView(LayoutInflater.java:596)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:644)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:223)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.Activity.setContentView(Activity.java:1786)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at com.example.myapp.DealerLocatorActivity.onCreate(DealerLocatorActivity.java:30)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.Activity.performCreate(Activity.java:4397)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     ... 11 more
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): Caused by: java.lang.reflect.InvocationTargetException
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at java.lang.reflect.Constructor.constructNative(Native Method)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at java.lang.reflect.Constructor.newInstance(Constructor.java:416)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.view.LayoutInflater.createView(LayoutInflater.java:576)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     ... 25 more
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): Caused by: java.lang.StackOverflowError
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.NinePatchDrawable.setNinePatchState(NinePatchDrawable.java:99)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.NinePatchDrawable.<init>(NinePatchDrawable.java:383)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.NinePatchDrawable.<init>(NinePatchDrawable.java:38)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.NinePatchDrawable$NinePatchState.newDrawable(NinePatchDrawable.java:373)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.getCachedDrawable(Resources.java:1972)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.loadDrawable(Resources.java:1873)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.getDrawable(Resources.java:655)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:832)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.Drawable.createFromXml(Drawable.java:769)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.loadDrawable(Resources.java:1903)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.getDrawable(Resources.java:655)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:832)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.Drawable.createFromXml(Drawable.java:769)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.loadDrawable(Resources.java:1903)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.content.res.Resources.getDrawable(Resources.java:655)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:832)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187):     at android.graphics.drawabl

Here is the layout at line 17:

<Spinner
    android:id="@+id/spn_dealer_type"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:layout_width="fill_parent"
    style="@style/Widget.Spinner"></Spinner>

Here is the style:

<style
    name="Widget.Spinner"
    parent="android:Widget">
    <item
        name="android:background">@drawable/spinner</item>
    <item
        name="android:clickable">true</item>
</style>

And here is the drawable:

<?xml version="1.0" encoding="utf-8"?>
<selector
    xmlns:android="http://schemas.android.com/apk/res/android">
<item
    android:state_focused="true"
    android:state_pressed="false"
    android:drawable="@drawable/spinner_light" />
<item
    android:state_focused="true"
    android:state_pressed="true"
    android:drawable="@drawable/spinner_dark" />
<item
    android:state_focused="false"
    android:state_pressed="true"
    android:drawable="@drawable/spinner_dark" />
<item
    android:drawable="@drawable/spinner" />
</selector>

As I said, this works fine on a phone, but is crashing on the Xoom. Any ideas what is wrong?

  • 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-26T04:45:23+00:00Added an answer on May 26, 2026 at 4:45 am

    This seems a problem:

    <item
        android:drawable="@drawable/spinner" />
    

    You’re referencing a drawable in itself. This is causing a stack overflow.

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

Sidebar

Related Questions

I have, for the time being, a custom view with a 9-patch image as
I have custom errors configured in my web.config, but IIS 6.0 is returning the
Here's what I have: Custom-made C# CMS where the content is stored in a
hi i would like to create a custom calendar, this calendar will have custom
I have some problems combining a custom marker icon with my infoWindow. Here is
I have my own custom webpart. Inside this webpart I would like to display
I have created a custom TaskButton control that takes an image and text. The
I have a tableView with the custom cell (see image below.) Taking a three
I have two questions about this: I am trying to assign an image to
I have a Django app with an image field (a custom ThumbnailImageField type) that

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.