Specific drawable not working?????

by mikedrmfs » Fri, 20 May 2011 09:30:40 GMT


Sponsored Links
 In a very simple menu the drawable @android:drawable/ic_media_stop
doesn''t work and @android:drawable/ic_media_pause does.

I get problem
[2011-05-19 14:04:52 - Twitter Update] W/ResourceType( 7852): Bad XML
block: header size 151 or total size 0 is larger than data size 0
[2011-05-19 14:04:52 - Twitter Update] M:\Development\Eclipse_Java
\eclipse\Workapace\Twitter Update\res\menu\menu.xml:6: error: Error:
No resource found that matches the given name (at 'icon' with value
'@android:drawable/ic_media_stop').

Both of them are in
M:\Program Files\Android\android-sdk\platforms\android-8\data\res
\drawable-mdpi

-- 



Re: Specific drawable not working?????

by Marcin Orlowski » Fri, 20 May 2011 16:46:37 GMT


 



You should copy drawables to your app's res folder.

Regards,
Marcin Orlowski

*Tray Agenda < http://bit.ly/trayagenda> ;* - keep you daily schedule handy...
*Date In Tray* < http://bit.ly/dateintraypro> ; - current date at glance...
WebnetMobile on *Facebook < http://webnetmobile.com/fb/> ;* and
*Twitter< http://webnetmobile.com/twitter/> ;
*

-- 


Sponsored Links


Other Threads

1. Problem running a compiled/packaged-with-v1.6 application on v1.5

Hi Guys,

I have an application which is based Android 1.5 but for enabling different
screen types support I have to compile and package it with v1.6. When I
install and run the resulted APK on my 1.5 emulator, everything works fine
except that "Preferences" activity crashes every time I launch it!

When I revert back my API dependency to 1.5 and remove a few 1.6 specific
config blocks from AndroidManifest.xml and compile/package it with 1.5,
everything works just fine!!

Below is the exception I get when it crashes. I will highly appreciate any
help on this:

D/AndroidRuntime(  985): Shutting down VM
W/dalvikvm(  985): threadid=3: thread exiting with uncaught exception
(group=0x4000fe70)
E/AndroidRuntime(  985): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  985): java.lang.RuntimeException: Binary XML file line
#18: You must supply a layout_width attribute.
E/AndroidRuntime(  985):        at
android.content.res.TypedArray.getLayoutDimension(TypedArray.java:438)
E/AndroidRuntime(  985):        at
android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3319)
E/AndroidRuntime(  985):        at
android.view.ViewGroup$LayoutParams.<init>(ViewGroup.java:3274)
E/AndroidRuntime(  985):        at
android.widget.AbsListView$LayoutParams.<init>(AbsListView.java:3242)
E/AndroidRuntime(  985):        at
android.widget.AbsListView.generateLayoutParams(AbsListView.java:3123)
E/AndroidRuntime(  985):        at
android.widget.AbsListView.generateLayoutParams(AbsListView.java:69)
E/AndroidRuntime(  985):        at
android.view.LayoutInflater.inflate(LayoutInflater.java:395)
E/AndroidRuntime(  985):        at
android.view.LayoutInflater.inflate(LayoutInflater.java:320)
E/AndroidRuntime(  985):        at
android.preference.Preference.onCreateView(Preference.java:412)
E/AndroidRuntime(  985):        at
android.preference.Preference.getView(Preference.java:389)
E/AndroidRuntime(  985):        at
android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.jav
a:187)
E/AndroidRuntime(  985):        at
android.widget.AbsListView.obtainView(AbsListView.java:1269)
E/AndroidRuntime(  985):        at
android.widget.ListView.makeAndAddView(ListView.java:1623)
E/AndroidRuntime(  985):        at
android.widget.ListView.fillDown(ListView.java:607)
E/AndroidRuntime(  985):        at
android.widget.ListView.fillFromTop(ListView.java:664)
E/AndroidRuntime(  985):        at
android.widget.ListView.layoutChildren(ListView.java:1481)
E/AndroidRuntime(  985):        at
android.widget.AbsListView.onLayout(AbsListView.java:1113)
E/AndroidRuntime(  985):        at android.view.View.layout(View.java:6133)
E/AndroidRuntime(  985):        at
android.widget.FrameLayout.onLayout(FrameLayout.java:333)
E/AndroidRuntime(  985):        at android.view.View.layout(View.java:6133)
E/AndroidRuntime(  985):        at
android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
E/AndroidRuntime(  985):        at
android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
E/AndroidRuntime(  985):        at
android.widget.LinearLayout.onLayout(LinearLayout.java:918)
E/AndroidRuntime(  985):        at android.view.View.layout(View.java:6133)
E/AndroidRuntime(  985):        at
android.widget.FrameLayout.onLayout(FrameLayout.java:333)
E/AndroidRuntime(  985):        at android.view.View.layout(View.java:6133)
E/AndroidRuntime(  985):        at
android.view.ViewRoot.performTraversals(ViewRoot.java:929)
E/AndroidRuntime(  985):        at
android.view.ViewRoot.handleMessage(ViewRoot.java:1482)
E/AndroidRuntime(  985):        at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  985):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  985):        at
android.app.ActivityThread.main(ActivityThread.java:3948)
E/AndroidRuntime(  985):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  985):        at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  985):        at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:7
82)
E/AndroidRuntime(  985):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/AndroidRuntime(  985):        at dalvik.system.NativeStart.main(Native
Method)

Best Regards,
Armond

-- 

2. launching settings from my app

Hi there,
Has anybody got the right intent to open sound settings?  I find that
this line of code:
     startActivity(new Intent
(android.provider.Settings.ACTION_SETTINGS));
works great, while this line, which should open exactly the Settings
panel I need to show, does not work at all and my application force
closes.
     startActivity(new Intent
(android.provider.Settings.ACTION_SOUND_SETTINGS));
I also find that the ACTION_DISPLAY_SETTINGS works on the emulator and
then does not work on the Hero device.  Does anyone have a suggestion
of how to open the sound settings?

I am using a try/catch block and an error toast to defensively code my
app not to crash this way.  Thanks in advance for any help you might
offer.

Regards,
Beth

-- 

3. Database Errors

4. Timepicker appearances, the disabled state is ugly

5. ProgressDialog went back to the first view called it when dismiss()

6. Trouble with getting proximity alerts

7. Device orientation - mapping device Y to screen Y