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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:51:40+00:00 2026-05-30T13:51:40+00:00

I need read-only Rating Bar with custom images. I tried several methods to do

  • 0

I need read-only Rating Bar with custom images. I tried several methods to do this:
Android RatingBar change star colors
and
How to create Custom Ratings bar in Android.
In both cases there’s an xml parsing problem.

I think it might be because of my android version – 2.2. Any suggestions?

Exception from logcat:

02-25 15:16:51.713: E/AndroidRuntime(309): FATAL EXCEPTION: main
02-25 15:16:51.713: E/AndroidRuntime(309): android.view.InflateException: Binary XML file line #70: Error inflating class android.widget.RatingBar
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.createView(LayoutInflater.java:513)
02-25 15:16:51.713: E/AndroidRuntime(309):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-25 15:16:51.713: E/AndroidRuntime(309):  at kz.mobidev.kinozavr.MovieListAdapter.getView(MovieListAdapter.java:40)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.AbsListView.obtainView(AbsListView.java:1315)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.ListView.makeAndAddView(ListView.java:1727)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.ListView.fillDown(ListView.java:652)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.ListView.fillFromTop(ListView.java:709)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.ListView.layoutChildren(ListView.java:1580)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.AbsListView.onLayout(AbsListView.java:1147)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.View.layout(View.java:7035)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.View.layout(View.java:7035)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.View.layout(View.java:7035)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.os.Looper.loop(Looper.java:123)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.app.ActivityThread.main(ActivityThread.java:4627)
02-25 15:16:51.713: E/AndroidRuntime(309):  at java.lang.reflect.Method.invokeNative(Native Method)
02-25 15:16:51.713: E/AndroidRuntime(309):  at java.lang.reflect.Method.invoke(Method.java:521)
02-25 15:16:51.713: E/AndroidRuntime(309):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-25 15:16:51.713: E/AndroidRuntime(309):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-25 15:16:51.713: E/AndroidRuntime(309):  at dalvik.system.NativeStart.main(Native Method)
02-25 15:16:51.713: E/AndroidRuntime(309): Caused by: java.lang.reflect.InvocationTargetException
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.RatingBar.(RatingBar.java:114)
02-25 15:16:51.713: E/AndroidRuntime(309):  at java.lang.reflect.Constructor.constructNative(Native Method)
02-25 15:16:51.713: E/AndroidRuntime(309):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.view.LayoutInflater.createView(LayoutInflater.java:500)
02-25 15:16:51.713: E/AndroidRuntime(309):  ... 32 more
02-25 15:16:51.713: E/AndroidRuntime(309): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ratingbar_red.xml from drawable resource ID #0x7f02001f
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.content.res.Resources.loadDrawable(Resources.java:1697)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.ProgressBar.(ProgressBar.java:178)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.AbsSeekBar.(AbsSeekBar.java:61)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.widget.RatingBar.(RatingBar.java:84)
02-25 15:16:51.713: E/AndroidRuntime(309):  ... 36 more
02-25 15:16:51.713: E/AndroidRuntime(309): Caused by: java.lang.NullPointerException
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.graphics.drawable.LayerDrawable.addLayer(LayerDrawable.java:185)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:156)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:788)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.graphics.drawable.Drawable.createFromXml(Drawable.java:729)
02-25 15:16:51.713: E/AndroidRuntime(309):  at android.content.res.Resources.loadDrawable(Resources.java:1694)
02-25 15:16:51.713: E/AndroidRuntime(309):  ... 40 more

I took this code from Android RatingBar change star colors:
ratingbar_red.xml:

<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@android:id/background" android:drawable="@drawable/star_white" />
    <item android:id="@android:id/secondaryProgress" android:drawable="@drawable/star_green" />
    <item android:id="@android:id/progress" android:drawable="@drawable/star_green" />
</layer-list>

and assigned this drawable ratingbar_red.xml to my ratingbar:

<RatingBar android:id="@+id/rbRating"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:progressDrawable="@drawable/ratingbar_red" />
  • 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-30T13:51:42+00:00Added an answer on May 30, 2026 at 1:51 pm
    Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ratingbar_red.xml
    

    Is your retingbar.xml in res/drawable folder? Check it.

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

Sidebar

Related Questions

I need to copy read-only files in Perl. I tried using Perl::Copy function, but
I need a consistent way to monitor databases that are read-only log shipped copies
I need a function to return a string that will only be accessed read-only.
What do you do if you need to generate a read-only list of data
I need to read a file in PHP, but I only know the end
Imagine the following: you read in a string with scanf() but you only need
I need to read a file line by line, and change a variable accordingly.
Need advice here: which of the STL container's operations are considered read-only? Take vector<int>
i need small script in python. Need to read custom block in a web
I need to clear the read-only flag of a file in my Perl program

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.