Hi All,
I have followed a tutorial on using graphics for the slider part of the seekbar, I can change the color using hex values and that works fine. But since I am having issues creating a hex code to get the green to blend into red, so I found a tutorial on using graphics with drawpatch9 and clips.
Here is my logcat..
07-22 15:08:16.142: E/AndroidRuntime(31331): FATAL EXCEPTION: main
07-22 15:08:16.142: E/AndroidRuntime(31331): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hsmtdemo/com.example.hsmtdemo.TESTMainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class android.widget.SeekBar
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2110)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2135)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.ActivityThread.access$700(ActivityThre ad.java:143)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1241)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.os.Handler.dispatchMessage(Handler.java:99 )
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.os.Looper.loop(Looper.java:137)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.ActivityThread.main(ActivityThread.jav a:4961)
07-22 15:08:16.142: E/AndroidRuntime(31331): at java.lang.reflect.Method.invokeNative(Native Method)
07-22 15:08:16.142: E/AndroidRuntime(31331): at java.lang.reflect.Method.invoke(Method.java:511)
07-22 15:08:16.142: E/AndroidRuntime(31331): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:1004)
07-22 15:08:16.142: E/AndroidRuntime(31331): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:771)
07-22 15:08:16.142: E/AndroidRuntime(31331): at dalvik.system.NativeStart.main(Native Method)
07-22 15:08:16.142: E/AndroidRuntime(31331): Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class android.widget.SeekBar
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.createView(LayoutInfla ter.java:613)
07-22 15:08:16.142: E/AndroidRuntime(31331): at com.android.internal.policy.impl.PhoneLayoutInflat er.onCreateView(PhoneLayoutInflater.java:56)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.onCreateView(LayoutInf later.java:660)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:685)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:746)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.inflate(LayoutInflater .java:489)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.inflate(LayoutInflater .java:396)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.inflate(LayoutInflater .java:352)
07-22 15:08:16.142: E/AndroidRuntime(31331): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:309)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.Activity.setContentView(Activity.java: 1914)
07-22 15:08:16.142: E/AndroidRuntime(31331): at com.example.hsmtdemo.TESTMainActivity.onCreate(TES TMainActivity.java:14)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.Activity.performCreate(Activity.java:5 179)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1094)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2074)
07-22 15:08:16.142: E/AndroidRuntime(31331): ... 11 more
07-22 15:08:16.142: E/AndroidRuntime(31331): Caused by: java.lang.reflect.InvocationTargetException
07-22 15:08:16.142: E/AndroidRuntime(31331): at java.lang.reflect.Constructor.constructNative(Nati ve Method)
07-22 15:08:16.142: E/AndroidRuntime(31331): at java.lang.reflect.Constructor.newInstance(Construc tor.java:417)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.view.LayoutInflater.createView(LayoutInfla ter.java:587)
07-22 15:08:16.142: E/AndroidRuntime(31331): ... 24 more
07-22 15:08:16.142: E/AndroidRuntime(31331): Caused by: android.content.res.Resources$NotFoundException: File res/xml/progbg.xml from drawable resource ID #0x7f040000
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.content.res.Resources.loadDrawable(Resourc es.java:1951)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.content.res.TypedArray.getDrawable(TypedAr ray.java:601)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.widget.ProgressBar.<init>(ProgressBar.java :263)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.widget.ProgressBar.<init>(ProgressBar.java :247)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.widget.AbsSeekBar.<init>(AbsSeekBar.java:7 6)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.widget.SeekBar.<init>(SeekBar.java:83)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.widget.SeekBar.<init>(SeekBar.java:79)
07-22 15:08:16.142: E/AndroidRuntime(31331): ... 27 more
07-22 15:08:16.142: E/AndroidRuntime(31331): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #18: <bitmap> requires a valid src attribute
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.BitmapDrawable.inflate(B itmapDrawable.java:448)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.Drawable.createFromXmlIn ner(Drawable.java:881)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.ClipDrawable.inflate(Cli pDrawable.java:97)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.Drawable.createFromXmlIn ner(Drawable.java:881)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.LayerDrawable.inflate(La yerDrawable.java:165)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.Drawable.createFromXmlIn ner(Drawable.java:881)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.graphics.drawable.Drawable.createFromXml(D rawable.java:818)
07-22 15:08:16.142: E/AndroidRuntime(31331): at android.content.res.Resources.loadDrawable(Resourc es.java:1948)
07-22 15:08:16.142: E/AndroidRuntime(31331): ... 33 more
in short the logcat has told me that it can't parse the xml file and something about it not being able to inflate the seekbar widget....any idea's on whats going wrong..
I had revised the code to reflect my apps needs. The code is attached because i'm having issues posting the code here.
Thanks