[android-developers] Re: Drawable Query

2012-10-10 Thread Piren
Sadly, Android doesn't support sub folders. Nothing to do here. On Tuesday, October 9, 2012 8:47:47 PM UTC+2, Daz wrote: I am working on a simple animation using the animation-list attribute. I have all my sequenced images in the drawable-xhdpi folder and the first line of my XML looks

[android-developers] Re: Drawable Query

2012-10-10 Thread bob
Sounds like you want to use assets instead of resources. Assets support subfolders. On Tuesday, October 9, 2012 1:47:47 PM UTC-5, Daz wrote: I am working on a simple animation using the animation-list attribute. I have all my sequenced images in the drawable-xhdpi folder and the first

[android-developers] Re: Drawable is not drawn after setDrawableByLayerId

2012-07-13 Thread Randall Mitchell
Since this hits the top of my search list for this issue, I thought I would give this thread an answer... From what I can tell, LayerDrawable. setDrawableByLayerId is useless on lots of devices (strangely works well on Nexus S). I suggest building a new LayerDrawable instead. On Wednesday,

[android-developers] Re: Drawable set on an ImageView ignores setBounds and reverts to original bounds on orientation change.

2012-02-26 Thread Kiran Rao
Anyone? I'd appreciate any pointers. I can't even figure out whether this is a bug or a coding error. On Feb 24, 10:49 am, Kiran Rao techie.curi...@gmail.com wrote: I've been struggling with this strange problem for quite some time. A brief summary of the issue is this: An ImageView's

[android-developers] Re: drawable resources is stored in RAM at startup?

2010-11-19 Thread viktor
Thanks, could any explain why this happened, I want to know memory strategy for Drawable? On 19 Лис, 22:04, Dianne Hackborn hack...@android.com wrote: You shouldn't modify a Drawable without first calling .mutate() on it (and using the Drawable that is returned, no the original). On

Re: [android-developers] Re: drawable resources is stored in RAM at startup?

2010-11-19 Thread Dianne Hackborn
On Fri, Nov 19, 2010 at 1:39 PM, viktor victor.scherb...@gmail.com wrote: could any explain why this happened, I want to know memory strategy for Drawable? It generally is described in the documentation for that method:

[android-developers] Re: Drawable not maintaining size within an ImageView

2010-06-30 Thread Cardy
Sorry! Just to clarify, I've also tried setting the ImageView's layout params as per the example using: drawableContainer.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); Thanks! On Jun 30, 10:04 am, Cardy andy.ca...@gmail.com wrote: Hi, I'm trying to

[android-developers] Re: Drawable resource images

2010-05-28 Thread John Gaby
Thanks for the reply. Is there a maximum length to the name of a drawable resource? On May 28, 4:02 pm, Mark Murphy mmur...@commonsware.com wrote: John Gaby wrote: Can I have sub-folders to hold my drawable resources.  For example can I store an image in, say,

Re: [android-developers] Re: Drawable resource images

2010-05-28 Thread Mark Murphy
John Gaby wrote: Thanks for the reply. Is there a maximum length to the name of a drawable resource? Probably. Whatever the maximum length of a Java identifier is would likely be the limiting factor. Don't know what that is off the top of my head though. 256? 128? -- Mark Murphy (a Commons

Re: [android-developers] Re: Drawable resource images

2010-05-28 Thread Romain Guy
According to the Java Language Specifications: An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. (Section 3.8) On Fri, May 28, 2010 at 4:18 PM, Mark Murphy mmur...@commonsware.com wrote: John Gaby wrote: Thanks for the

[android-developers] Re: Drawable resource XML alias

2010-05-16 Thread skink
On May 15, 4:38 pm, String sterling.ud...@googlemail.com wrote: On May 15, 7:07 am, skink psk...@gmail.com wrote: BitmapDrawable bd = (BitmapDrawable) res.getDrawable(R.drawable.name2) and then: bd.getBitmap() IIRC Ha, that did the trick. Apparently Resources.getDrawable() works with

[android-developers] Re: Drawable resource XML alias

2010-05-15 Thread skink
On May 15, 2:59 am, String sterling.ud...@googlemail.com wrote: On May 14, 6:12 pm, Mark Murphy mmur...@commonsware.com wrote: http://idunnolol.com/android/drawables.html Thanks for this link. Hadn't seen that one before. Your syntax may work just as is. Unfortunately, it doesn't. I

[android-developers] Re: Drawable resource XML alias

2010-05-15 Thread String
On May 15, 7:07 am, skink psk...@gmail.com wrote: BitmapDrawable bd = (BitmapDrawable) res.getDrawable(R.drawable.name2) and then: bd.getBitmap() IIRC Ha, that did the trick. Apparently Resources.getDrawable() works with an XML drawable proxy, but BitmapFactory.decodeResource() does not.

[android-developers] Re: Drawable resource XML alias

2010-05-14 Thread String
On May 14, 6:12 pm, Mark Murphy mmur...@commonsware.com wrote: http://idunnolol.com/android/drawables.html Thanks for this link. Hadn't seen that one before. Your syntax may work just as is. Unfortunately, it doesn't. I thought it looked plausible too, but naturally I tried it (along with a

[android-developers] Re: drawable-hdpi not appearing in eclipse emulator

2010-05-12 Thread String
In fairness, Cameron, the docs don't actually say that android:anyDensity=false causes resources to be pulled from mdpi. The documentation for that attribute is buried in the middle of the Support for Multiple Screens page, and mostly talks about pixel density math. The confusion is compounded by

[android-developers] Re: drawable-hdpi not appearing in eclipse emulator

2010-05-11 Thread Cameron.M.Johnson
This is from the Android Dev Guide http://developer.android.com/guide/ practices/screens_support.html Pre-scaling of resources (such as image assets) For example, if the current screen's density is high, the platform loads resources that are tagged with the qualifier hdpi and uses them without

Re: [android-developers] Re: drawable-hdpi not appearing in eclipse emulator

2010-05-11 Thread Dianne Hackborn
Again, if you want to support multiple densities DON'T SAY YOU DON'T SUPPORT THEM. Seriously! :) The first thing to do is get rid of android:anyDensity=false so the system doesn't try to make your app think it is running in mdpi. If you still have problems after that, then we can talk about

[android-developers] Re: drawable, drawable-land, drawable-hdpi, drawable-mdpi, drawable-lpdi

2009-11-16 Thread Digital Agua
I looked forever for that, and there it is. Thanks, James On Nov 15, 9:21 pm, adamphillips12 adamphillip...@gmail.com wrote: That would work fine but resource types have precedence, you need to name them correctly. drawable-land-hdpi etc, see the documentation for the full order:

[android-developers] Re: drawable, drawable-land, drawable-hdpi, drawable-mdpi, drawable-lpdi

2009-11-15 Thread adamphillips12
That would work fine but resource types have precedence, you need to name them correctly. drawable-land-hdpi etc, see the documentation for the full order: http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources On Nov 16, 2:18 pm, Digital Agua

[android-developers] Re: Drawable tilemode repat only vertically

2009-09-12 Thread xiaowei guo
hi, only repeat vertically,u can use BitmapDrawable.setTileModeX(int TileMode); 2009/8/19 Klaus Kartou kar...@gmail.com Hi! Is there a way to specify that a drawable should only be repeated vertically and then stretched horizontally? At the momemt I use the following which repeates the

[android-developers] Re: Drawable

2009-08-30 Thread Sasi Kumar
How can we use map to map give one example. plz On Aug 28, 10:21 am, quill quill...@163.com wrote: Use a map to map your key and drawable id. On Aug 28, 12:48 pm, Sasi Kumar sasikumar.it1...@gmail.com wrote: my code is:- Drawabel partlycloud=res.getDrawable(R.drawable.a65_color_31);

[android-developers] Re: Drawable

2009-08-28 Thread quill
Use a map to map your key and drawable id. On Aug 28, 12:48 pm, Sasi Kumar sasikumar.it1...@gmail.com wrote: my code is:- Drawabel partlycloud=res.getDrawable(R.drawable.a65_color_31); I have more images like a65_color_31 a66_color_31 a67_color_31 a68_color_31 a69_color_31

[android-developers] Re: Drawable

2009-08-27 Thread Desu Vinod Kumar
HI Put the resources in to the integer array from call like this image=BitmapFactory.decodeStream(context.getResources() .openRawResource(images[i])); On Fri, Aug 28, 2009 at 10:18 AM, Sasi Kumar sasikumar.it1...@gmail.comwrote: my code is:- Drawabel

[android-developers] Re: Drawable cannot draw into Canvas

2009-05-26 Thread Romain Guy
You need to set the bounds of the drawable first. On Tue, May 26, 2009 at 9:35 AM, Jay pathomp...@gmail.com wrote: I want to load an icon from resource and draw over it. But I cannot get it into a canvas. Can anyone please help me with the code below. If I uncomment c.drawColor(), I get blue

[android-developers] Re: Drawable or Uri for Notification icon

2009-04-09 Thread android_dev
Looking for comments on this On Mar 24, 11:20 pm, android_dev esks...@gmail.com wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Drawable doesn't load sometimes

2008-12-15 Thread Cheryl Sedota
Romain, What is the bug number for this? Was it fixed in the 1.0 r2 SDK? - Cheryl On Nov 12, 7:25 am, blindfold seeingwithso...@gmail.com wrote: Interesting. In case this Android bug/feature not only applies to input streams, this might also explain why I no longer had memory related

[android-developers] Re: Drawable doesn't load sometimes

2008-12-15 Thread Romain Guy
It wasn't fixed in 1.0r2. We cannot put fixes in the SDK if they are not available on the phones. Also, the bug is internal, it's not on the external tracker. On Mon, Dec 15, 2008 at 11:30 PM, Cheryl Sedota cherylsed...@gmail.com wrote: Romain, What is the bug number for this? Was it fixed

[android-developers] Re: Drawable doesn't load sometimes

2008-12-15 Thread Cheryl Sedota
Romain, Can you please give details on the exact problem with the current 1.0 SDK? Should we avoid Drawables completely in favor of setting resource id's or bitmap objects? Or is the problem specific to a use case like loading remote images (via URL)? Based on the comment above that

[android-developers] Re: Drawable doesn't load sometimes

2008-12-15 Thread Romain Guy
It has nothing to do with Drawables, it's just a buffering issue with loading large bitmaps over slow connections. Local images are NOT problematic at all, and BitmapFactory.decodeResource() is certainly not better than getResources().getDrawable() since the latter pretty much uses the former :)

[android-developers] Re: Drawable doesn't load sometimes

2008-11-12 Thread blindfold
Interesting. In case this Android bug/feature not only applies to input streams, this might also explain why I no longer had memory related crashes on the G1 after recently switching to using BitmapFactory.decodeResource(getResources() instead of getResources ().getDrawable() to retrieve

[android-developers] Re: Drawable doesn't load sometimes

2008-11-11 Thread Romain Guy
This is a known bug. Here is a workaround: in = new BufferedInputStream(new URL(getUrl(size)).openStream(), IO_BUFFER_SIZE); final ByteArrayOutputStream dataStream = new ByteArrayOutputStream(); out = new

[android-developers] Re: Drawable doesn't load sometimes

2008-11-11 Thread Obormot
It did help! Thanks a lot! Of course, I now create a bunch of unnecessary objects, but hope it'll be fixed soon... On Nov 11, 10:30 pm, Romain Guy [EMAIL PROTECTED] wrote: This is a known bug. Here is a workaround:                     in = new BufferedInputStream(new

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread Guillaume Perrot
It's probably because MapView doesn't set the state of the bubbles. In fact it works well with state_focused, but we have to handle the focus ourself, I had to override the onTap functions to set the focus myself. I am not sure to understand the concept of focused overlay item... On 12 sep,

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread Guillaume Perrot
For those who are interested: @Override protected boolean onTap(int index) { /* Set focus on tapped item so that he's drawn over others */ setFocus(getItem(index)); /* Consume tap event */ return true; } @Override public boolean onTap(GeoPoint p, MapView mapView)

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread Guillaume Perrot
In fact I was hacking focus to handle a selection mechanism. It will be useful in a next version of the SDK to have both states handled. I also found in the documentation: It also dispatches Tap and Focus- change events to optional listeners. But we can only listen to focus-change, I had to

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread hackbod
The selector drawable tries each item in order, until it finds the first that matches the current state. So you want the one with the least specific state (in this case the one that requires no states) to be after ones with more specific state requirements. On Sep 12, 4:00 am, Guillaume Perrot

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread Guillaume Perrot
Luckily, it's what I've done, but I will try to remember that for future drawables :p On 22 sep, 10:51, hackbod [EMAIL PROTECTED] wrote: The selector drawable tries each item in order, until it finds the first that matches the current state.  So you want the one with the least specific state

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread Guillaume Perrot
Oh, it explains what it fails the first time. I didn't realize the second time I tested it, I used the right order. Thanks for that tip ! On 22 sep, 10:51, hackbod [EMAIL PROTECTED] wrote: The selectordrawabletries each item in order, until it finds the first that matches the current state.  

[android-developers] Re: Drawable in XML referencing other drawables by state.

2008-09-22 Thread Guillaume Perrot
I didn't realize I was using the wrong order in my first test, and the right order in my recent test... Thanks for the tip hackbod, I'll try to remember that for future drawables... On 22 sep, 10:51, hackbod [EMAIL PROTECTED] wrote: The selectordrawabletries each item in order, until it finds