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. I want to know a button's width before it is drawn on the screen! possible?

Hello everyone!

I need a bit of help for an app I am trying to develop.

I've got a main screen with a couple of buttons on it.

What I would like to do is get the width of those buttons before they
are actually drawn on the screen. Their width is variable, as theyr
are defined as "wrap_content" in my main.xml

I tried to get the buttons' width in the methods onCreate() and
onStart() but all I get is a 0 measure, obviously because their width
can't be measured yet.

Do you know a way to do that?

this is an example of the code at the moment :

public void onCreate(Bundle savedInstanceState) {

int maxButton; // I save the biggest button width in this variable

Button testButton = (Button)findViewById(R.id.test); // button 1
Button testButton2 = (Button)findViewById(R.id.test2); // button 2
Button testButton3 = (Button)findViewById(R.id.test3); // button 3

maxButton=testButton.getWidth(); // I put button 1's width into
maxButton
if(testButton2.getWidth() > maxButton) { // If button 2's width is
bigger
maxButton = testButton2.getWidth(); // maxButton gets button 2's width
testButton3.setText("Button 2 is bigger than button 1!");
}
else
testButton3.setText("Button 1 is bigger than button 2!");

}

Thanks a lot,
Erken

--~--~---------~--~----~------------~-------~--~----~

2. Hardware



HTC and T-Mobile are welcome to do what they want; it's a part of 
free-market economies.

It is fairly common in the US for phones to be subsidized and, 
therefore, SIM-locked and tied to a two-year contract. Off the top of my 
head, I'm not aware of any major US wireless carrier that *doesn't* work 
this way.

HTC is welcome to sell un-badged/unlocked HTC Dream phones, if their 
contract with T-Mobile allows it. I have no idea if it does or not -- 
the terms of HTC's and T-Mobile's contract are (presumably) private to 
their firms. Again, welcome to the free-market economy. I get the 
impression that HTC's typical contracts don't allow them to directly 
sell such devices in the US market, but that they can sell them 
elsewhere, allowing resellers to bring them stateside. Watch the sites 
of your favorite mobile device resellers, or watch eBay.

Also, there may be markets that Deutsche Telekom/T-Mobile enter that 
require unlocked phones. Not every country supports the US phone 
distribution model. So it may be that, where you are, you will be able 
to get one unlocked and without a contract from the start.

Also also, I've heard that T-Mobile will unlock your G1 for you after 90 
days, but I don't recall seeing a definitive statement from T-Mobile 
confirming that point.

So, rolling back to your original point, if you have proof that HTC and 
T-Mobile wanted to buck tradition and sell unsubsidized/unlocked phones 
in the US market, and Google forced them at gunpoint to do otherwise, 
please post a link!


This is an issue for HTC, and secondarily T-Mobile. Google is more 
involved than, say, the Apache Foundation, but the whole *point* of 
Android is to create an open source mobile operating system that firms 
could use with no strings attached. No strings attached means just that 
-- and in the US market, requiring unsubsidized/unlocked phones would be 
considered a substantial string.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~

3. How do I rename a folder?

4. How to make an application icon & its name invisible in menu list.

5. Registering and Handling of ContentObserver for Contacts database - handlers first invokation ???

6. HELP!! the code will not compile and I can't find anybody with the same issue

7. Modifying data before passing it to a list