[android-developers] Drawable

2009-08-27 Thread Sasi Kumar
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 a70_color_31 a71_color_31 If user gives input as 67 then my drawable should be Drawabel partlycloud=res.getDrawable(R.drawable.a

[android-developers] Drawable issues

2010-04-21 Thread Ashwini
Hi, I am trying to resize an image in a textview (set using imagespan). I tried using setbounds but the image is not reflected. OnPreDraw - set the bounds OnDraw - shows the image in some weird place - the updated position isn't shown correctly. Can someone please suggest any other option to res

[android-developers] Drawable Query

2012-10-09 Thread Darryl Griffiths
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 like this: To keep things tidy, I decided to create a new folder called "seq" inside of the drawable-xhdpi and moved my images in

[android-developers] Drawable resource images

2010-05-28 Thread John Gaby
Can I have sub-folders to hold my drawable resources. For example can I store an image in, say, 'res/drawable/content/images/myimage.jpg' and then find that resource via a call to: id = context.getResources().getIdentifier("com.mycompany.myprog:drawable/ content/images/myimage", null, null); I h

[android-developers] drawable resolution problem

2012-04-26 Thread nikki
Hi, I am having an image in my drawable and drawable-xhdpi folder. When I run the build on a hdpi device, it picks image from xhdpi folder. I am not able to understand the reason behind it. As per my assumption it should pick from drawable folder. Please help. Thanks -- You received this messa

[android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Carter
When using android:minSdkVersion less than 9, is it (or should it be) standard practice to use "drawable-xhdpi-v9" instead of "drawable-xhdpi"? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-de

[android-developers] Drawable doesn't load sometimes

2008-11-11 Thread Obormot
Hi, guys. I load Drawables (jpeg pictures) from URLs the following way: URL urlO = new URL(url); URLConnection urlC = urlO.openConnection(); InputStream is = urlC.getInputStream(); return Drawable.createFromStream(is, url); It's fun

[android-developers] Drawable resource image size.

2010-10-10 Thread billw
Hi, I am writing a GL app and, as such, am only loading drawable resources at the last second (right before they are rendered for the first time). The problem with this is that I need to know the size of the image before I get to the rendering portion of code. Ideally I would like to automatically

[android-developers] Drawable Setbounds not working

2010-04-21 Thread Ashwini
I am trying to scale a drawable at run time depending on the orientation and and handset dimensions. But this does not seem to take effect. This is done on onPreDraw() of textview. It's a textview having text and images. Works fine on the 2.x handsets but does not work on the 1.6 ones. Any ideas

[android-developers] Drawable resource XML "alias"

2010-05-14 Thread String
Does anyone know the syntax for an XML file for a single bitmap drawable resource? What I'm looking to do is "alias" a drawable in my app. I have need for the same image with 2 different names, and rather than including the image twice in my res/drawable directory, I'd rather alias it (it's fairly

Re: [android-developers] Drawable resource images

2010-05-28 Thread Mark Murphy
John Gaby wrote: > Can I have sub-folders to hold my drawable resources. For example can > I store an image in, say, 'res/drawable/content/images/myimage.jpg' > and then find that resource via a call to: > > id = > context.getResources().getIdentifier("com.mycompany.myprog:drawable/ > content/ima

Re: [android-developers] drawable resolution problem

2012-04-26 Thread Justin Anderson
> > As per my assumption it should pick from drawable folder. > As per your assumption you are wrong... :-) http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Apr 2

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Murphy
On Sat, May 26, 2012 at 11:05 AM, Mark Carter wrote: > When using android:minSdkVersion less than 9, is it (or should it be) > standard practice to use "drawable-xhdpi-v9" instead of "drawable-xhdpi"? It is not standard practice, nor would I recommend it. You use a -vNN resource set when you need

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Carter
When min level is pre-Donut, I remember there is a common approach to use drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as "drawable") for similar reasons. If I have an app with ONLY xhdpi resources and set the minimum level to 8, then I notice the drawable-xhdpi resources are

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Murphy
On Sat, May 26, 2012 at 12:12 PM, Mark Carter wrote: > When min level is pre-Donut, I remember there is a common approach to use > drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as > "drawable") for similar reasons. > > If I have an app with ONLY xhdpi resources and set the minimum

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Dianne Hackborn
There is no need to here, previous versions of the platform (down to API 4) know about the density configuration and will pick the correct density for you. On Sat, May 26, 2012 at 9:20 AM, Mark Murphy wrote: > On Sat, May 26, 2012 at 12:12 PM, Mark Carter > wrote: > > When min level is pre-Donut

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Carter
Do you just mean the density configuration in general? Surely Donut did not specifically know about xhdpi (which was only introduced in Gingerbread)? On 27 May 2012 10:53, Dianne Hackborn wrote: > There is no need to here, previous versions of the platform (down to API > 4) know about the densi

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Dianne Hackborn
There isn't really anything special about xhdpi -- aapt just converts that to the appropriate density value (320 for xhdpi), and the platform since API 4 knows how to pick the best density given any numbers for screen density and resource density. On Sat, May 26, 2012 at 8:51 PM, Mark Carter wrot

[android-developers] Drawable in a String

2011-04-20 Thread pennstate24
I'm trying to get a Drawable image to show up in a String or CharSequence and all I'm getting is the integer number of the image. Can anyone please help me out with this? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group

[android-developers] Drawable tilemode repat only vertically

2009-08-18 Thread Klaus Kartou
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 drawable both in the vertical and horizontal direction: http://schemas.android.com/apk/res/android"; android:src="@drawable/wal

[android-developers] drawable out of memory (urgent)

2009-05-25 Thread arnouf
Hi all, I'm trying to load 4Mb of png in a parcelable arraylist. When more than 1mb is loaded in my list I take an outofmemory exception. Is there a size limit for an arraylist, for. Drawable loaded in memory, or another. Thanks a lot for your answers. --~--~-~--~~~--

[android-developers] Drawable cannot draw into Canvas

2009-05-26 Thread Jay
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 color as expected. So the problem is on icon.draw(). Drawable icon = getResources().getDrawable(R.drawable.icon

Re: [android-developers] Drawable resource XML "alias"

2010-05-14 Thread Mark Murphy
String wrote: > Does anyone know the syntax for an XML file for a single bitmap > drawable resource? What I'm looking to do is "alias" a drawable in my > app. I have need for the same image with 2 different names, and rather > than including the image twice in my res/drawable directory, I'd > rathe

Re: [android-developers] Drawable in a String

2011-04-21 Thread Mark Murphy
Try Html.fromHtml("Here is an http://www.foo.com/something.png\\";>") and using that SpannedString result in your TextView. I might have the Java quoting rules messed up here, as I'm typing that from memory. On Wed, Apr 20, 2011 at 2:04 PM, pennstate24 wrote: > I'm trying to get a Drawable image

[android-developers] Drawable or Uri for Notification icon

2009-03-24 Thread android_dev
The Notification API allows to set a drawable resource id for the icon of a notification. This drawable resource id is used to put the icon in the status bar and in the expanded window shade. This is a limitation if the icon images are to be represented by a Drawable or from a content provider at

[android-developers] Drawable is not drawn after setDrawableByLayerId

2010-02-03 Thread tt6
Hi, I'm having a problem with displaying a drawable. I have a ImageButton and a LayerDrawable. I set up an array of Drawable that has one Drawable for the background (index 0) and one for the image (index 1). The button would display different background on different states of the button. What I'

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

2010-05-11 Thread Cameron.M.Johnson
Hi there, So I have this game running on Android 1.6, and I put the different density images in their respective folders res/drawable-hdpi/image.png res/drawable-mdpi/image.png res/drawable-ldpi/image.png I made each image a different color so I can tell if it is loading the right image. When I

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

2010-06-30 Thread Cardy
Hi, I'm trying to add a drawable to a layout, using an ImageView, but the drawable doesn't maintain its size and is rendered at 1dp x 1dp. I've called ImageView.setAdjustViewBounds as per the android documentation but this doesn't seem to help. The Drawable is only visible when the ImageView's he

[android-developers] Drawable selector not working in Jelly Bean

2012-09-17 Thread FiltrSoft
Posted this on SO, but not getting much help, so thought I'd ask here. You can see all of the details on SO, but basically I have a drawable selector for my ListView that works fine in previous versions of Android except for Jelly Bean. I've narrowed it down to either "state_selected" or "sta

[android-developers] drawable in xhdpi not getting picked up

2011-02-24 Thread Mark Nuetzmann
I am trying to get an app that currently runs just fine on hdpi and lower devices to work on the new XOOM that has xhdpi. I have a png image in my /drawable folder and a replacement in the /drawble-hdpi-v6 folder. On the XOOM, the version in the /drawable folder is getting picked up. I tried cre

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

2008-09-12 Thread Guillaume Perrot
I found two interesting drawables in ApiDemos: http://schemas.android.com/apk/res/android";> http://schemas.android.com/apk/res/ android"> I found no documentation for this kind of drawable. In ItemizedOverlay we can use drawables with state_focused is handled. I tr

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

2010-05-11 Thread Dianne Hackborn
You told it you don't support densities with android:anyDensity="false". Thus it will run your app as if it is the original density, mdpi. In some cases the framework may be able to actually load the correct density resource and seamlessly use it while you still think you are running in mdpi... b

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

2010-11-19 Thread viktor
Hi everyone, Drawable resource is set as background for second layouts (Second activity). My problem is, I get Drawable from resources end set color filter to that, than I set this drawable to layout (First activity). On second activity I don't set color filter but background remain the same.

Re: [android-developers] drawable in xhdpi not getting picked up

2011-02-24 Thread Dianne Hackborn
Xoom is not xhdpi. It is mdpi. On Thu, Feb 24, 2011 at 3:34 PM, Mark Nuetzmann wrote: > I am trying to get an app that currently runs just fine on hdpi and > lower devices to work on the new XOOM that has xhdpi. I have a png > image in my /drawable folder and a replacement in the /drawble-hdpi-

[android-developers] Drawable advantage over bitmap for memory in android

2011-01-01 Thread Tabman
This question is linked with the answers in the following question: http://stackoverflow.com/questions/4259851/error-removing-bitmapsandroid/4260269#4260269 Is there any advantage of using Drawable over Bitmap in Android in terms of memory de-allocation ? I was looking at Romain Guy project Shel

[android-developers] @drawable/logo is not showing the icon in Emulator

2009-03-18 Thread androidSpb
Hi I am not able to show the icon at the startup time in my emulator This is the code what i have in manifest.xml and I have logo.png in drawble folder. But still i am not getting that icon it is diaplying simply blank block image. Can any one help me in this --~--~-~--~~

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

2009-11-15 Thread Digital Agua
I have a question that I hope someone can help me out with. I have an app that I started in 1.6. It used images that were specific to portrait and landscape layouts. I put these in the corresponding drawable folders, for example: drawable/image01,png drawable-land/image01.png when I created a ne

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

2010-11-19 Thread Dianne Hackborn
You shouldn't modify a Drawable without first calling .mutate() on it (and using the Drawable that is returned, no the original). On Fri, Nov 19, 2010 at 6:39 AM, viktor wrote: > Hi everyone, > > Drawable resource is set as background for second layouts (Second > activity). > > My problem is, I

[android-developers] Drawable from createFromResourceStream for a xlarge screen or a xhdpi resolution

2011-01-19 Thread Learning_Android
Hi Allm I have an image which I have in form of a stream. I want to create a drawable from this stream so that I can set it as background for my view or ImageView which occupies the whole device screen. I did the below code to achieve the same but facing some issues Drawable.createFromResourceStr

[android-developers] Drawable from createFromResourceStream for a xlarge screen or a xhdpi resolution

2011-01-19 Thread Learning_Android
Hi All, I have an image which I have in form of a stream. I want to create a drawable from this stream so that I can set it as background for my view or ImageView which occupies the whole device screen. I did the below code to achieve the same but facing some issues Drawable.createFromResourceStr

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

2012-02-24 Thread Kiran Rao
I've been struggling with this strange problem for quite some time. A brief summary of the issue is this: "An ImageView's Drawable in portrait orientation with a certain bounds set on it, on changing orientation and returning to portrait, does not retain the set bounds. Instead it reverts to its o